diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2d470c8f2f..0031eb15e8 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -24816,6 +24816,189 @@ components: type: $ref: "#/components/schemas/CSMAgentsType" type: object + CsmAgentlessHostAttributes: + description: Attributes of an agentless host. + properties: + account_id: + description: The ID of the cloud account that the host belongs to. + example: "123456789012" + type: string + cloud_provider: + $ref: "#/components/schemas/CsmCloudProvider" + has_posture_management: + description: Whether CSM Misconfigurations is enabled for this host. `true` if enabled; `false` if disabled. + example: true + type: boolean + has_vulnerability_scanning: + description: Whether CSM Vulnerabilities is enabled for this host. `true` if enabled; `false` if disabled. + example: true + type: boolean + resource_type: + $ref: "#/components/schemas/CsmAgentlessHostResourceType" + required: + - account_id + - cloud_provider + - resource_type + - has_posture_management + - has_vulnerability_scanning + type: object + CsmAgentlessHostData: + description: A single agentless host resource. + properties: + attributes: + $ref: "#/components/schemas/CsmAgentlessHostAttributes" + id: + description: The resource identifier of the agentless host. + example: i-0123456789abcdef0 + type: string + type: + $ref: "#/components/schemas/CsmAgentlessHostType" + required: + - id + - type + - attributes + type: object + CsmAgentlessHostFacetAttributes: + description: Attributes of an agentless host facet. + properties: + bounded: + description: Whether the facet has a bounded set of allowed values. `true` indicates a fixed value set and `false` indicates free-form values. + example: true + type: boolean + bundled: + description: Whether the facet is bundled as part of the default facet set. `true` indicates bundled and `false` indicates custom. + example: true + type: boolean + bundledAndUsed: + description: Whether the facet is both bundled and actively used. `true` indicates in use; `false` indicates unused. + example: true + type: boolean + defaultValues: + $ref: "#/components/schemas/CsmHostFacetDefaultValues" + description: + description: A human-readable description of what the facet represents. + example: The cloud provider of the resource + type: string + editable: + description: Whether the facet can be edited by users. `true` indicates editable; `false` indicates read-only. + example: false + type: boolean + facetType: + description: The UI display type for the facet, such as `list`. + example: list + type: string + groups: + $ref: "#/components/schemas/CsmHostFacetGroups" + name: + description: The display name of the facet. + example: Cloud Provider + type: string + path: + description: The field path used when filtering by this facet. + example: cloud_provider + type: string + source: + description: The data source that provides the facet values. + example: core + type: string + type: + description: The data type of the facet values. + example: string + type: string + values: + $ref: "#/components/schemas/CsmHostFacetValues" + required: + - name + - path + - description + - groups + - bounded + - bundled + - bundledAndUsed + - defaultValues + - editable + - facetType + - source + - type + - values + type: object + CsmAgentlessHostFacetData: + description: A single agentless host facet resource. + properties: + attributes: + $ref: "#/components/schemas/CsmAgentlessHostFacetAttributes" + id: + description: The identifier of the facet, corresponding to the field path. + example: cloud_provider + type: string + type: + $ref: "#/components/schemas/CsmAgentlessHostFacetType" + required: + - id + - type + - attributes + type: object + CsmAgentlessHostFacetItems: + description: The list of available facets for agentless hosts. + items: + $ref: "#/components/schemas/CsmAgentlessHostFacetData" + type: array + CsmAgentlessHostFacetType: + default: agentless_host_facet + description: The JSON:API type for agentless host facet resources. The value should always be `agentless_host_facet`. + enum: + - agentless_host_facet + example: agentless_host_facet + type: string + x-enum-varnames: + - AGENTLESS_HOST_FACET + CsmAgentlessHostFacetsResponse: + description: The response returned when listing facets for agentless hosts. + properties: + data: + $ref: "#/components/schemas/CsmAgentlessHostFacetItems" + required: + - data + type: object + CsmAgentlessHostItems: + description: The list of agentless hosts for the current page. + items: + $ref: "#/components/schemas/CsmAgentlessHostData" + type: array + CsmAgentlessHostResourceType: + description: The type of cloud resource for an agentless host. + enum: + - aws_ec2_instance + - azure_virtual_machine_instance + - gcp_compute_instance + - oci_instance + example: aws_ec2_instance + type: string + x-enum-varnames: + - AWS_EC2_INSTANCE + - AZURE_VIRTUAL_MACHINE_INSTANCE + - GCP_COMPUTE_INSTANCE + - OCI_INSTANCE + CsmAgentlessHostType: + default: agentless_host + description: The JSON:API type for agentless host resources. The value should always be `agentless_host`. + enum: + - agentless_host + example: agentless_host + type: string + x-enum-varnames: + - AGENTLESS_HOST + CsmAgentlessHostsResponse: + description: The response returned when listing agentless hosts. + properties: + data: + $ref: "#/components/schemas/CsmAgentlessHostItems" + meta: + $ref: "#/components/schemas/CsmSettingsMeta" + required: + - data + - meta + type: object CsmAgentsAttributes: description: "A CSM Agent returned by the API." properties: @@ -24934,6 +25117,20 @@ components: data: $ref: "#/components/schemas/CsmCloudAccountsCoverageAnalysisData" type: object + CsmCloudProvider: + description: The cloud provider of a host resource. + enum: + - aws + - gcp + - azure + - oci + example: aws + type: string + x-enum-varnames: + - AWS + - GCP + - AZURE + - OCI CsmCoverageAnalysis: description: CSM Coverage Analysis. properties: @@ -24958,6 +25155,103 @@ components: format: int64 type: integer type: object + CsmFacetInfoType: + default: facet_info + description: The JSON:API type for facet info resources. The value should always be `facet_info`. + enum: + - facet_info + example: facet_info + type: string + x-enum-varnames: + - FACET_INFO + CsmHostFacetDefaultValues: + description: The list of default filter values for the facet. + example: [] + items: + type: string + type: array + CsmHostFacetGroups: + description: The list of UI groups that this facet belongs to. + example: + - agentless + items: + type: string + type: array + CsmHostFacetInfoAttributes: + description: Attributes of a facet info response, containing the value distribution for the requested facet. + properties: + items: + $ref: "#/components/schemas/CsmHostFacetInfoItems" + required: + - items + type: object + CsmHostFacetInfoData: + description: The data wrapper for a facet info response. + properties: + attributes: + $ref: "#/components/schemas/CsmHostFacetInfoAttributes" + id: + description: The identifier of the facet. + example: cloud_provider + type: string + meta: + $ref: "#/components/schemas/CsmHostFacetInfoMeta" + type: + $ref: "#/components/schemas/CsmFacetInfoType" + required: + - id + - type + - attributes + - meta + type: object + CsmHostFacetInfoItem: + description: A single value and its occurrence count for a facet. + properties: + count: + description: The number of resources with this facet value. + example: 100 + format: int64 + type: integer + value: + description: The facet value. + example: aws + type: string + required: + - value + - count + type: object + CsmHostFacetInfoItems: + description: The list of facet value entries for the current page. + items: + $ref: "#/components/schemas/CsmHostFacetInfoItem" + type: array + CsmHostFacetInfoMeta: + description: Metadata for the facet info response. + properties: + total_count: + description: The total number of distinct values for this facet. + example: 4 + format: int64 + type: integer + required: + - total_count + type: object + CsmHostFacetInfoResponse: + description: The response returned when requesting value distribution for a specific facet. + properties: + data: + $ref: "#/components/schemas/CsmHostFacetInfoData" + required: + - data + type: object + CsmHostFacetValues: + description: The list of allowed filter values for bounded facets. Empty for unbounded facets. + example: + - aws + - gcp + items: + type: string + type: array CsmHostsAndContainersCoverageAnalysisAttributes: description: CSM Hosts and Containers Coverage Analysis attributes. properties: @@ -25030,6 +25324,235 @@ components: data: $ref: "#/components/schemas/CsmServerlessCoverageAnalysisData" type: object + CsmSettingsMeta: + description: Pagination metadata for a CSM settings list response. + properties: + page_index: + description: The current page index (zero-based). + example: 0 + format: int64 + type: integer + page_size: + description: The number of resources returned per page. + example: 10 + format: int64 + type: integer + total_filtered: + description: The total number of resources matching the filter criteria. + example: 100 + format: int64 + type: integer + required: + - total_filtered + - page_index + - page_size + type: object + CsmUnifiedHostAttributes: + description: Attributes of a unified host, combining data from agent and agentless sources. + properties: + account_id: + description: The ID of the cloud account that the host belongs to. Present only when the host was discovered through agentless scanning. + example: "123456789012" + nullable: true + type: string + agent_csm_vm_containers_enabled: + description: Whether CSM Vulnerabilities is enabled for containers through the Datadog Agent. `true` if enabled; `false` if disabled. + example: false + nullable: true + type: boolean + agent_csm_vm_hosts_enabled: + description: Whether CSM Vulnerabilities is enabled for hosts through the Datadog Agent. `true` if enabled; `false` if disabled. + example: true + nullable: true + type: boolean + agent_cws_enabled: + description: Whether CSM Threats is enabled for this host through the Datadog Agent. `true` if enabled; `false` if disabled. + example: false + nullable: true + type: boolean + agent_posture_management: + description: Whether CSM Misconfigurations is enabled for this host through the Datadog Agent. `true` if enabled; `false` if disabled. + example: true + nullable: true + type: boolean + agent_version: + description: The version of the Datadog Agent running on this host. + example: 7.50.0 + nullable: true + type: string + agentless_posture_management: + description: Whether CSM Misconfigurations is enabled for this host via agentless scanning. `true` if enabled; `false` if disabled. + example: false + nullable: true + type: boolean + agentless_vulnerability_scanning: + description: Whether CSM Vulnerabilities is enabled for this host via agentless scanning. `true` if enabled; `false` if disabled. + example: true + nullable: true + type: boolean + cloud_provider: + $ref: "#/components/schemas/CsmCloudProvider" + cluster_name: + description: The name of the Kubernetes cluster the host belongs to, if applicable. + example: my-cluster + nullable: true + type: string + datadog_agent_key: + description: The Datadog Agent key associated with this host. Present only for agent-sourced hosts. + example: key123 + nullable: true + type: string + env: + description: The list of environment tags associated with this host. + example: + - prod + items: + type: string + nullable: true + type: array + host_id: + description: The internal Datadog host identifier. Present only for agent-sourced hosts. + example: 12345678 + format: int64 + nullable: true + type: integer + install_method_tool: + description: The tool used to install the Datadog Agent on this host. + example: helm + nullable: true + type: string + os: + description: The operating system of the host. Present only for agent-sourced hosts. + example: linux + nullable: true + type: string + resource_type: + $ref: "#/components/schemas/CsmAgentlessHostResourceType" + source: + $ref: "#/components/schemas/CsmUnifiedHostSource" + required: + - source + type: object + CsmUnifiedHostData: + description: A single unified host resource, combining agent and agentless data. + properties: + attributes: + $ref: "#/components/schemas/CsmUnifiedHostAttributes" + id: + description: The resource identifier of the unified host. + example: i-0123456789abcdef0 + type: string + type: + $ref: "#/components/schemas/CsmUnifiedHostType" + required: + - id + - type + - attributes + type: object + CsmUnifiedHostFacetData: + description: A single unified host facet resource. + properties: + attributes: + $ref: "#/components/schemas/CsmAgentlessHostFacetAttributes" + id: + description: The identifier of the facet, corresponding to the field path. + example: cloud_provider + type: string + type: + $ref: "#/components/schemas/CsmUnifiedHostFacetType" + required: + - id + - type + - attributes + type: object + CsmUnifiedHostFacetItems: + description: The list of available facets for unified hosts. + items: + $ref: "#/components/schemas/CsmUnifiedHostFacetData" + type: array + CsmUnifiedHostFacetType: + default: unified_host_facet + description: The JSON:API type for unified host facet resources. The value should always be `unified_host_facet`. + enum: + - unified_host_facet + example: unified_host_facet + type: string + x-enum-varnames: + - UNIFIED_HOST_FACET + CsmUnifiedHostFacetsResponse: + description: The response returned when listing facets for unified hosts. + properties: + data: + $ref: "#/components/schemas/CsmUnifiedHostFacetItems" + required: + - data + type: object + CsmUnifiedHostItems: + description: The list of unified hosts for the current page. + items: + $ref: "#/components/schemas/CsmUnifiedHostData" + type: array + CsmUnifiedHostSource: + description: The source of a unified host entry, indicating whether it was discovered via agent, agentless scanning, or both. + enum: + - agent + - agentless + - both + example: agent + type: string + x-enum-varnames: + - AGENT + - AGENTLESS + - BOTH + CsmUnifiedHostType: + default: unified_host + description: The JSON:API type for unified host resources. The value should always be `unified_host`. + enum: + - unified_host + example: unified_host + type: string + x-enum-varnames: + - UNIFIED_HOST + CsmUnifiedHostsMeta: + description: Pagination metadata for a unified hosts list response. + properties: + page_index: + description: The current page index (zero-based). + example: 0 + format: int64 + type: integer + page_size: + description: The number of hosts returned per page. + example: 10 + format: int64 + type: integer + total_filtered: + description: The total number of hosts matching the filter criteria. + example: 100 + format: int64 + type: integer + total_pages: + description: The total number of pages available. + example: 10 + format: int64 + type: integer + required: + - total_filtered + - page_index + - page_size + - total_pages + type: object + CsmUnifiedHostsResponse: + description: The response returned when listing unified hosts. + properties: + data: + $ref: "#/components/schemas/CsmUnifiedHostItems" + meta: + $ref: "#/components/schemas/CsmUnifiedHostsMeta" + required: + - data + - meta + type: object CustomAttributeConfig: description: "A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options." properties: @@ -119900,6 +120423,375 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Get all CSM Serverless Agents tags: ["CSM Agents"] + /api/v2/csm/settings/agentless_hosts: + get: + description: Get the list of agentless hosts for CSM, with optional pagination and filtering. + operationId: ListCSMAgentlessHosts + parameters: + - description: The page index for pagination (zero-based). + in: query + name: page + required: false + schema: + default: 0 + example: 0 + format: int32 + maximum: 1000000 + minimum: 0 + type: integer + - description: The number of agentless hosts to return per page. + in: query + name: size + required: false + schema: + default: 10 + example: 10 + format: int32 + maximum: 100 + minimum: 1 + type: integer + - description: A search query string to filter agentless hosts. + in: query + name: query + required: false + schema: + example: "cloud_provider:aws" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + account_id: "123456789012" + cloud_provider: aws + has_posture_management: true + has_vulnerability_scanning: true + resource_type: aws_ec2_instance + id: i-0123456789abcdef0 + type: agentless_host + meta: + page_index: 0 + page_size: 10 + total_filtered: 1 + schema: + $ref: "#/components/schemas/CsmAgentlessHostsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List agentless hosts + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/agentless_hosts/facet_info: + get: + description: Get the value distribution for a specific agentless host facet, with optional search and filtering. + operationId: GetCSMAgentlessHostFacetInfo + parameters: + - description: The facet identifier to retrieve value distribution for. Valid values are `resource_name`, `account_id`, `resource_type`, `cloud_provider`, `has_vulnerability_scanning`, and `has_posture_management`. + in: query + name: facet + required: true + schema: + example: cloud_provider + type: string + - description: A search string to filter the facet values. + in: query + name: search + required: false + schema: + example: aws + type: string + - description: A filter query to scope the facet value counts. + in: query + name: query + required: false + schema: + example: "cloud_provider:aws" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + items: + - count: 100 + value: aws + - count: 50 + value: gcp + id: cloud_provider + meta: + total_count: 2 + type: facet_info + schema: + $ref: "#/components/schemas/CsmHostFacetInfoResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get agentless host facet info + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/agentless_hosts/facets: + get: + description: Get the list of available facets for filtering agentless hosts. + operationId: ListCSMAgentlessHostFacets + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + bounded: true + bundled: true + bundledAndUsed: true + defaultValues: [] + description: The cloud provider of the resource. + editable: false + facetType: list + groups: + - agentless + name: Cloud Provider + path: cloud_provider + source: core + type: string + values: + - aws + - gcp + - azure + - oci + id: cloud_provider + type: agentless_host_facet + schema: + $ref: "#/components/schemas/CsmAgentlessHostFacetsResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List agentless host facets + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/hosts: + get: + description: Get the list of unified hosts for CSM, combining agent and agentless host data, with optional pagination and filtering. + operationId: ListCSMUnifiedHosts + parameters: + - description: The page index for pagination (zero-based). + in: query + name: page + required: false + schema: + default: 0 + example: 0 + format: int32 + maximum: 1000000 + minimum: 0 + type: integer + - description: The number of hosts to return per page. + in: query + name: size + required: false + schema: + default: 10 + example: 10 + format: int32 + maximum: 100 + minimum: 1 + type: integer + - description: A search query string to filter unified hosts. + in: query + name: query + required: false + schema: + example: "source:agent" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + agent_cws_enabled: false + agent_posture_management: true + agent_version: 7.50.0 + datadog_agent_key: key123 + os: linux + source: agent + id: agent-host + type: unified_host + - attributes: + account_id: "123456789012" + agentless_posture_management: true + agentless_vulnerability_scanning: true + cloud_provider: aws + resource_type: aws_ec2_instance + source: agentless + id: i-0123456789abcdef0 + type: unified_host + meta: + page_index: 0 + page_size: 10 + total_filtered: 2 + total_pages: 1 + schema: + $ref: "#/components/schemas/CsmUnifiedHostsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List unified hosts + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/hosts/facet_info: + get: + description: Get the value distribution for a specific unified host facet, with optional search and filtering. + operationId: GetCSMUnifiedHostFacetInfo + parameters: + - description: The facet identifier to retrieve value distribution for. Valid values include `resource_name`, `account_id`, `resource_type`, `cloud_provider`, `agentless_vulnerability_scanning`, `agentless_posture_management`, `hostname`, `agent_version`, `os`, `cluster_name`, `agent_posture_management`, `agent_cws_enabled`, `agent_csm_vm_hosts_enabled`, and `agent_csm_vm_containers_enabled`. + in: query + name: facet + required: true + schema: + example: cloud_provider + type: string + - description: A search string to filter the facet values. + in: query + name: search + required: false + schema: + example: aws + type: string + - description: A filter query to scope the facet value counts. + in: query + name: query + required: false + schema: + example: "cloud_provider:aws" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + items: + - count: 100 + value: aws + - count: 50 + value: gcp + id: cloud_provider + meta: + total_count: 2 + type: facet_info + schema: + $ref: "#/components/schemas/CsmHostFacetInfoResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get unified host facet info + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/hosts/facets: + get: + description: Get the list of available facets for filtering unified hosts. + operationId: ListCSMUnifiedHostFacets + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + bounded: true + bundled: true + bundledAndUsed: true + defaultValues: [] + description: The cloud provider of the resource. + editable: false + facetType: list + groups: + - hosts + name: Cloud Provider + path: cloud_provider + source: core + type: string + values: + - aws + - gcp + - azure + - oci + id: cloud_provider + type: unified_host_facet + schema: + $ref: "#/components/schemas/CsmUnifiedHostFacetsResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List unified host facets + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/current_user: get: description: |- @@ -181119,6 +182011,11 @@ tags: all in a unified view for seamless collaboration and faster remediation. Go to https://docs.datadoghq.com/security/cloud_security_management to learn more. name: "CSM Coverage Analysis" + - description: |- + Datadog Cloud Security Management (CSM) Settings APIs allow you to list and filter + your cloud hosts monitored by CSM, covering both agentless and agent-based discovery. + For more information, see [Cloud Security Management](https://docs.datadoghq.com/security/cloud_security_management). + name: "CSM Settings" - description: |- Workload Protection monitors file, network, and process activity across your environment to detect real-time threats to your infrastructure. See [Workload Protection](https://docs.datadoghq.com/security/workload_protection/) for more information on setting up Workload Protection. diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index fdced5d696..d5fd8adfcd 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -228,6 +228,13 @@ datadog\_api\_client.v2.api.csm\_coverage\_analysis\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.csm\_settings\_api module +----------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.csm_settings_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.csm\_threats\_api module ---------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index f1ceac9025..00b29897a4 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -9678,6 +9678,69 @@ datadog\_api\_client.v2.model.csm\_agent\_data module :members: :show-inheritance: +datadog\_api\_client.v2.model.csm\_agentless\_host\_attributes module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_host\_data module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_host\_facet\_attributes module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_facet_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_host\_facet\_data module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_facet_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_host\_facet\_type module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_facet_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_host\_facets\_response module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_facets_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_host\_resource\_type module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_resource_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_host\_type module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_host_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_agentless\_hosts\_response module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_agentless_hosts_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.csm\_agents\_attributes module ------------------------------------------------------------ @@ -9727,6 +9790,13 @@ datadog\_api\_client.v2.model.csm\_cloud\_accounts\_coverage\_analysis\_response :members: :show-inheritance: +datadog\_api\_client.v2.model.csm\_cloud\_provider module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_cloud_provider + :members: + :show-inheritance: + datadog\_api\_client.v2.model.csm\_coverage\_analysis module ------------------------------------------------------------ @@ -9734,6 +9804,48 @@ datadog\_api\_client.v2.model.csm\_coverage\_analysis module :members: :show-inheritance: +datadog\_api\_client.v2.model.csm\_facet\_info\_type module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_facet_info_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_host\_facet\_info\_attributes module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_host_facet_info_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_host\_facet\_info\_data module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_host_facet_info_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_host\_facet\_info\_item module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_host_facet_info_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_host\_facet\_info\_meta module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_host_facet_info_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_host\_facet\_info\_response module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_host_facet_info_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.csm\_hosts\_and\_containers\_coverage\_analysis\_attributes module ------------------------------------------------------------------------------------------------ @@ -9776,6 +9888,76 @@ datadog\_api\_client.v2.model.csm\_serverless\_coverage\_analysis\_response modu :members: :show-inheritance: +datadog\_api\_client.v2.model.csm\_settings\_meta module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_settings_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_host\_attributes module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_host_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_host\_data module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_host_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_host\_facet\_data module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_host_facet_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_host\_facet\_type module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_host_facet_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_host\_facets\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_host_facets_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_host\_source module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_host_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_host\_type module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_host_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_hosts\_meta module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.csm_unified_hosts_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.csm\_unified\_hosts\_response module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.csm_unified_hosts_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.custom\_attribute\_config module -------------------------------------------------------------- diff --git a/examples/v2/csm-settings/GetCSMAgentlessHostFacetInfo.py b/examples/v2/csm-settings/GetCSMAgentlessHostFacetInfo.py new file mode 100644 index 0000000000..9cecd6fe53 --- /dev/null +++ b/examples/v2/csm-settings/GetCSMAgentlessHostFacetInfo.py @@ -0,0 +1,16 @@ +""" +Get agentless host facet info returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.csm_settings_api import CSMSettingsApi + +configuration = Configuration() +configuration.unstable_operations["get_csm_agentless_host_facet_info"] = True +with ApiClient(configuration) as api_client: + api_instance = CSMSettingsApi(api_client) + response = api_instance.get_csm_agentless_host_facet_info( + facet="cloud_provider", + ) + + print(response) diff --git a/examples/v2/csm-settings/GetCSMUnifiedHostFacetInfo.py b/examples/v2/csm-settings/GetCSMUnifiedHostFacetInfo.py new file mode 100644 index 0000000000..9c2e7bea95 --- /dev/null +++ b/examples/v2/csm-settings/GetCSMUnifiedHostFacetInfo.py @@ -0,0 +1,16 @@ +""" +Get unified host facet info returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.csm_settings_api import CSMSettingsApi + +configuration = Configuration() +configuration.unstable_operations["get_csm_unified_host_facet_info"] = True +with ApiClient(configuration) as api_client: + api_instance = CSMSettingsApi(api_client) + response = api_instance.get_csm_unified_host_facet_info( + facet="cloud_provider", + ) + + print(response) diff --git a/examples/v2/csm-settings/ListCSMAgentlessHostFacets.py b/examples/v2/csm-settings/ListCSMAgentlessHostFacets.py new file mode 100644 index 0000000000..eb4789b1f7 --- /dev/null +++ b/examples/v2/csm-settings/ListCSMAgentlessHostFacets.py @@ -0,0 +1,14 @@ +""" +List agentless host facets returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.csm_settings_api import CSMSettingsApi + +configuration = Configuration() +configuration.unstable_operations["list_csm_agentless_host_facets"] = True +with ApiClient(configuration) as api_client: + api_instance = CSMSettingsApi(api_client) + response = api_instance.list_csm_agentless_host_facets() + + print(response) diff --git a/examples/v2/csm-settings/ListCSMAgentlessHosts.py b/examples/v2/csm-settings/ListCSMAgentlessHosts.py new file mode 100644 index 0000000000..2c996e3114 --- /dev/null +++ b/examples/v2/csm-settings/ListCSMAgentlessHosts.py @@ -0,0 +1,14 @@ +""" +List agentless hosts returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.csm_settings_api import CSMSettingsApi + +configuration = Configuration() +configuration.unstable_operations["list_csm_agentless_hosts"] = True +with ApiClient(configuration) as api_client: + api_instance = CSMSettingsApi(api_client) + response = api_instance.list_csm_agentless_hosts() + + print(response) diff --git a/examples/v2/csm-settings/ListCSMUnifiedHostFacets.py b/examples/v2/csm-settings/ListCSMUnifiedHostFacets.py new file mode 100644 index 0000000000..55ef56ff9b --- /dev/null +++ b/examples/v2/csm-settings/ListCSMUnifiedHostFacets.py @@ -0,0 +1,14 @@ +""" +List unified host facets returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.csm_settings_api import CSMSettingsApi + +configuration = Configuration() +configuration.unstable_operations["list_csm_unified_host_facets"] = True +with ApiClient(configuration) as api_client: + api_instance = CSMSettingsApi(api_client) + response = api_instance.list_csm_unified_host_facets() + + print(response) diff --git a/examples/v2/csm-settings/ListCSMUnifiedHosts.py b/examples/v2/csm-settings/ListCSMUnifiedHosts.py new file mode 100644 index 0000000000..3d502de7b0 --- /dev/null +++ b/examples/v2/csm-settings/ListCSMUnifiedHosts.py @@ -0,0 +1,14 @@ +""" +List unified hosts returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.csm_settings_api import CSMSettingsApi + +configuration = Configuration() +configuration.unstable_operations["list_csm_unified_hosts"] = True +with ApiClient(configuration) as api_client: + api_instance = CSMSettingsApi(api_client) + response = api_instance.list_csm_unified_hosts() + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 62cd8f6abf..bfa06d68f7 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -464,6 +464,12 @@ def __init__( "v2.list_cost_tag_metadata_months": False, "v2.list_cost_tag_metadata_orchestrators": False, "v2.search_cost_recommendations": False, + "v2.get_csm_agentless_host_facet_info": False, + "v2.get_csm_unified_host_facet_info": False, + "v2.list_csm_agentless_host_facets": False, + "v2.list_csm_agentless_hosts": False, + "v2.list_csm_unified_host_facets": False, + "v2.list_csm_unified_hosts": False, "v2.create_dashboard_secure_embed": False, "v2.delete_dashboard_secure_embed": False, "v2.get_dashboard_secure_embed": False, diff --git a/src/datadog_api_client/v2/api/csm_settings_api.py b/src/datadog_api_client/v2/api/csm_settings_api.py new file mode 100644 index 0000000000..ae041c3725 --- /dev/null +++ b/src/datadog_api_client/v2/api/csm_settings_api.py @@ -0,0 +1,355 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.csm_agentless_hosts_response import CsmAgentlessHostsResponse +from datadog_api_client.v2.model.csm_host_facet_info_response import CsmHostFacetInfoResponse +from datadog_api_client.v2.model.csm_agentless_host_facets_response import CsmAgentlessHostFacetsResponse +from datadog_api_client.v2.model.csm_unified_hosts_response import CsmUnifiedHostsResponse +from datadog_api_client.v2.model.csm_unified_host_facets_response import CsmUnifiedHostFacetsResponse + + +class CSMSettingsApi: + """ + Datadog Cloud Security Management (CSM) Settings APIs allow you to list and filter + your cloud hosts monitored by CSM, covering both agentless and agent-based discovery. + For more information, see `Cloud Security Management `_. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._get_csm_agentless_host_facet_info_endpoint = _Endpoint( + settings={ + "response_type": (CsmHostFacetInfoResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/csm/settings/agentless_hosts/facet_info", + "operation_id": "get_csm_agentless_host_facet_info", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "facet": { + "required": True, + "openapi_types": (str,), + "attribute": "facet", + "location": "query", + }, + "search": { + "openapi_types": (str,), + "attribute": "search", + "location": "query", + }, + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_csm_unified_host_facet_info_endpoint = _Endpoint( + settings={ + "response_type": (CsmHostFacetInfoResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/csm/settings/hosts/facet_info", + "operation_id": "get_csm_unified_host_facet_info", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "facet": { + "required": True, + "openapi_types": (str,), + "attribute": "facet", + "location": "query", + }, + "search": { + "openapi_types": (str,), + "attribute": "search", + "location": "query", + }, + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_csm_agentless_host_facets_endpoint = _Endpoint( + settings={ + "response_type": (CsmAgentlessHostFacetsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/csm/settings/agentless_hosts/facets", + "operation_id": "list_csm_agentless_host_facets", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_csm_agentless_hosts_endpoint = _Endpoint( + settings={ + "response_type": (CsmAgentlessHostsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/csm/settings/agentless_hosts", + "operation_id": "list_csm_agentless_hosts", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page": { + "validation": { + "inclusive_maximum": 1000000, + "inclusive_minimum": 0, + }, + "openapi_types": (int,), + "attribute": "page", + "location": "query", + }, + "size": { + "validation": { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + "openapi_types": (int,), + "attribute": "size", + "location": "query", + }, + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_csm_unified_host_facets_endpoint = _Endpoint( + settings={ + "response_type": (CsmUnifiedHostFacetsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/csm/settings/hosts/facets", + "operation_id": "list_csm_unified_host_facets", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_csm_unified_hosts_endpoint = _Endpoint( + settings={ + "response_type": (CsmUnifiedHostsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/csm/settings/hosts", + "operation_id": "list_csm_unified_hosts", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page": { + "validation": { + "inclusive_maximum": 1000000, + "inclusive_minimum": 0, + }, + "openapi_types": (int,), + "attribute": "page", + "location": "query", + }, + "size": { + "validation": { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + "openapi_types": (int,), + "attribute": "size", + "location": "query", + }, + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + def get_csm_agentless_host_facet_info( + self, + facet: str, + *, + search: Union[str, UnsetType] = unset, + query: Union[str, UnsetType] = unset, + ) -> CsmHostFacetInfoResponse: + """Get agentless host facet info. + + Get the value distribution for a specific agentless host facet, with optional search and filtering. + + :param facet: The facet identifier to retrieve value distribution for. Valid values are ``resource_name`` , ``account_id`` , ``resource_type`` , ``cloud_provider`` , ``has_vulnerability_scanning`` , and ``has_posture_management``. + :type facet: str + :param search: A search string to filter the facet values. + :type search: str, optional + :param query: A filter query to scope the facet value counts. + :type query: str, optional + :rtype: CsmHostFacetInfoResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["facet"] = facet + + if search is not unset: + kwargs["search"] = search + + if query is not unset: + kwargs["query"] = query + + return self._get_csm_agentless_host_facet_info_endpoint.call_with_http_info(**kwargs) + + def get_csm_unified_host_facet_info( + self, + facet: str, + *, + search: Union[str, UnsetType] = unset, + query: Union[str, UnsetType] = unset, + ) -> CsmHostFacetInfoResponse: + """Get unified host facet info. + + Get the value distribution for a specific unified host facet, with optional search and filtering. + + :param facet: The facet identifier to retrieve value distribution for. Valid values include ``resource_name`` , ``account_id`` , ``resource_type`` , ``cloud_provider`` , ``agentless_vulnerability_scanning`` , ``agentless_posture_management`` , ``hostname`` , ``agent_version`` , ``os`` , ``cluster_name`` , ``agent_posture_management`` , ``agent_cws_enabled`` , ``agent_csm_vm_hosts_enabled`` , and ``agent_csm_vm_containers_enabled``. + :type facet: str + :param search: A search string to filter the facet values. + :type search: str, optional + :param query: A filter query to scope the facet value counts. + :type query: str, optional + :rtype: CsmHostFacetInfoResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["facet"] = facet + + if search is not unset: + kwargs["search"] = search + + if query is not unset: + kwargs["query"] = query + + return self._get_csm_unified_host_facet_info_endpoint.call_with_http_info(**kwargs) + + def list_csm_agentless_host_facets( + self, + ) -> CsmAgentlessHostFacetsResponse: + """List agentless host facets. + + Get the list of available facets for filtering agentless hosts. + + :rtype: CsmAgentlessHostFacetsResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_csm_agentless_host_facets_endpoint.call_with_http_info(**kwargs) + + def list_csm_agentless_hosts( + self, + *, + page: Union[int, UnsetType] = unset, + size: Union[int, UnsetType] = unset, + query: Union[str, UnsetType] = unset, + ) -> CsmAgentlessHostsResponse: + """List agentless hosts. + + Get the list of agentless hosts for CSM, with optional pagination and filtering. + + :param page: The page index for pagination (zero-based). + :type page: int, optional + :param size: The number of agentless hosts to return per page. + :type size: int, optional + :param query: A search query string to filter agentless hosts. + :type query: str, optional + :rtype: CsmAgentlessHostsResponse + """ + kwargs: Dict[str, Any] = {} + if page is not unset: + kwargs["page"] = page + + if size is not unset: + kwargs["size"] = size + + if query is not unset: + kwargs["query"] = query + + return self._list_csm_agentless_hosts_endpoint.call_with_http_info(**kwargs) + + def list_csm_unified_host_facets( + self, + ) -> CsmUnifiedHostFacetsResponse: + """List unified host facets. + + Get the list of available facets for filtering unified hosts. + + :rtype: CsmUnifiedHostFacetsResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_csm_unified_host_facets_endpoint.call_with_http_info(**kwargs) + + def list_csm_unified_hosts( + self, + *, + page: Union[int, UnsetType] = unset, + size: Union[int, UnsetType] = unset, + query: Union[str, UnsetType] = unset, + ) -> CsmUnifiedHostsResponse: + """List unified hosts. + + Get the list of unified hosts for CSM, combining agent and agentless host data, with optional pagination and filtering. + + :param page: The page index for pagination (zero-based). + :type page: int, optional + :param size: The number of hosts to return per page. + :type size: int, optional + :param query: A search query string to filter unified hosts. + :type query: str, optional + :rtype: CsmUnifiedHostsResponse + """ + kwargs: Dict[str, Any] = {} + if page is not unset: + kwargs["page"] = page + + if size is not unset: + kwargs["size"] = size + + if query is not unset: + kwargs["query"] = query + + return self._list_csm_unified_hosts_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 299d30f49a..ea90bf0e99 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -17,6 +17,7 @@ from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi from datadog_api_client.v2.api.csm_agents_api import CSMAgentsApi from datadog_api_client.v2.api.csm_coverage_analysis_api import CSMCoverageAnalysisApi +from datadog_api_client.v2.api.csm_settings_api import CSMSettingsApi from datadog_api_client.v2.api.csm_threats_api import CSMThreatsApi from datadog_api_client.v2.api.case_management_api import CaseManagementApi from datadog_api_client.v2.api.case_management_attribute_api import CaseManagementAttributeApi @@ -144,6 +145,7 @@ "CIVisibilityTestsApi", "CSMAgentsApi", "CSMCoverageAnalysisApi", + "CSMSettingsApi", "CSMThreatsApi", "CaseManagementApi", "CaseManagementAttributeApi", diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_attributes.py b/src/datadog_api_client/v2/model/csm_agentless_host_attributes.py new file mode 100644 index 0000000000..aa416f3c1c --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_attributes.py @@ -0,0 +1,74 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_cloud_provider import CsmCloudProvider + from datadog_api_client.v2.model.csm_agentless_host_resource_type import CsmAgentlessHostResourceType + + +class CsmAgentlessHostAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_cloud_provider import CsmCloudProvider + from datadog_api_client.v2.model.csm_agentless_host_resource_type import CsmAgentlessHostResourceType + + return { + "account_id": (str,), + "cloud_provider": (CsmCloudProvider,), + "has_posture_management": (bool,), + "has_vulnerability_scanning": (bool,), + "resource_type": (CsmAgentlessHostResourceType,), + } + + attribute_map = { + "account_id": "account_id", + "cloud_provider": "cloud_provider", + "has_posture_management": "has_posture_management", + "has_vulnerability_scanning": "has_vulnerability_scanning", + "resource_type": "resource_type", + } + + def __init__( + self_, + account_id: str, + cloud_provider: CsmCloudProvider, + has_posture_management: bool, + has_vulnerability_scanning: bool, + resource_type: CsmAgentlessHostResourceType, + **kwargs, + ): + """ + Attributes of an agentless host. + + :param account_id: The ID of the cloud account that the host belongs to. + :type account_id: str + + :param cloud_provider: The cloud provider of a host resource. + :type cloud_provider: CsmCloudProvider + + :param has_posture_management: Whether CSM Misconfigurations is enabled for this host. ``true`` if enabled; ``false`` if disabled. + :type has_posture_management: bool + + :param has_vulnerability_scanning: Whether CSM Vulnerabilities is enabled for this host. ``true`` if enabled; ``false`` if disabled. + :type has_vulnerability_scanning: bool + + :param resource_type: The type of cloud resource for an agentless host. + :type resource_type: CsmAgentlessHostResourceType + """ + super().__init__(kwargs) + + self_.account_id = account_id + self_.cloud_provider = cloud_provider + self_.has_posture_management = has_posture_management + self_.has_vulnerability_scanning = has_vulnerability_scanning + self_.resource_type = resource_type diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_data.py b/src/datadog_api_client/v2/model/csm_agentless_host_data.py new file mode 100644 index 0000000000..2e2faed313 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_data.py @@ -0,0 +1,54 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_agentless_host_attributes import CsmAgentlessHostAttributes + from datadog_api_client.v2.model.csm_agentless_host_type import CsmAgentlessHostType + + +class CsmAgentlessHostData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_agentless_host_attributes import CsmAgentlessHostAttributes + from datadog_api_client.v2.model.csm_agentless_host_type import CsmAgentlessHostType + + return { + "attributes": (CsmAgentlessHostAttributes,), + "id": (str,), + "type": (CsmAgentlessHostType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: CsmAgentlessHostAttributes, id: str, type: CsmAgentlessHostType, **kwargs): + """ + A single agentless host resource. + + :param attributes: Attributes of an agentless host. + :type attributes: CsmAgentlessHostAttributes + + :param id: The resource identifier of the agentless host. + :type id: str + + :param type: The JSON:API type for agentless host resources. The value should always be ``agentless_host``. + :type type: CsmAgentlessHostType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_facet_attributes.py b/src/datadog_api_client/v2/model/csm_agentless_host_facet_attributes.py new file mode 100644 index 0000000000..80984aa4be --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_facet_attributes.py @@ -0,0 +1,122 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CsmAgentlessHostFacetAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "bounded": (bool,), + "bundled": (bool,), + "bundled_and_used": (bool,), + "default_values": ([str],), + "description": (str,), + "editable": (bool,), + "facet_type": (str,), + "groups": ([str],), + "name": (str,), + "path": (str,), + "source": (str,), + "type": (str,), + "values": ([str],), + } + + attribute_map = { + "bounded": "bounded", + "bundled": "bundled", + "bundled_and_used": "bundledAndUsed", + "default_values": "defaultValues", + "description": "description", + "editable": "editable", + "facet_type": "facetType", + "groups": "groups", + "name": "name", + "path": "path", + "source": "source", + "type": "type", + "values": "values", + } + + def __init__( + self_, + bounded: bool, + bundled: bool, + bundled_and_used: bool, + default_values: List[str], + description: str, + editable: bool, + facet_type: str, + groups: List[str], + name: str, + path: str, + source: str, + type: str, + values: List[str], + **kwargs, + ): + """ + Attributes of an agentless host facet. + + :param bounded: Whether the facet has a bounded set of allowed values. ``true`` indicates a fixed value set and ``false`` indicates free-form values. + :type bounded: bool + + :param bundled: Whether the facet is bundled as part of the default facet set. ``true`` indicates bundled and ``false`` indicates custom. + :type bundled: bool + + :param bundled_and_used: Whether the facet is both bundled and actively used. ``true`` indicates in use; ``false`` indicates unused. + :type bundled_and_used: bool + + :param default_values: The list of default filter values for the facet. + :type default_values: [str] + + :param description: A human-readable description of what the facet represents. + :type description: str + + :param editable: Whether the facet can be edited by users. ``true`` indicates editable; ``false`` indicates read-only. + :type editable: bool + + :param facet_type: The UI display type for the facet, such as ``list``. + :type facet_type: str + + :param groups: The list of UI groups that this facet belongs to. + :type groups: [str] + + :param name: The display name of the facet. + :type name: str + + :param path: The field path used when filtering by this facet. + :type path: str + + :param source: The data source that provides the facet values. + :type source: str + + :param type: The data type of the facet values. + :type type: str + + :param values: The list of allowed filter values for bounded facets. Empty for unbounded facets. + :type values: [str] + """ + super().__init__(kwargs) + + self_.bounded = bounded + self_.bundled = bundled + self_.bundled_and_used = bundled_and_used + self_.default_values = default_values + self_.description = description + self_.editable = editable + self_.facet_type = facet_type + self_.groups = groups + self_.name = name + self_.path = path + self_.source = source + self_.type = type + self_.values = values diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_facet_data.py b/src/datadog_api_client/v2/model/csm_agentless_host_facet_data.py new file mode 100644 index 0000000000..f6bcb0f951 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_facet_data.py @@ -0,0 +1,56 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_agentless_host_facet_attributes import CsmAgentlessHostFacetAttributes + from datadog_api_client.v2.model.csm_agentless_host_facet_type import CsmAgentlessHostFacetType + + +class CsmAgentlessHostFacetData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_agentless_host_facet_attributes import CsmAgentlessHostFacetAttributes + from datadog_api_client.v2.model.csm_agentless_host_facet_type import CsmAgentlessHostFacetType + + return { + "attributes": (CsmAgentlessHostFacetAttributes,), + "id": (str,), + "type": (CsmAgentlessHostFacetType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, attributes: CsmAgentlessHostFacetAttributes, id: str, type: CsmAgentlessHostFacetType, **kwargs + ): + """ + A single agentless host facet resource. + + :param attributes: Attributes of an agentless host facet. + :type attributes: CsmAgentlessHostFacetAttributes + + :param id: The identifier of the facet, corresponding to the field path. + :type id: str + + :param type: The JSON:API type for agentless host facet resources. The value should always be ``agentless_host_facet``. + :type type: CsmAgentlessHostFacetType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_facet_type.py b/src/datadog_api_client/v2/model/csm_agentless_host_facet_type.py new file mode 100644 index 0000000000..f416531b93 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_facet_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmAgentlessHostFacetType(ModelSimple): + """ + The JSON:API type for agentless host facet resources. The value should always be `agentless_host_facet`. + + :param value: If omitted defaults to "agentless_host_facet". Must be one of ["agentless_host_facet"]. + :type value: str + """ + + allowed_values = { + "agentless_host_facet", + } + AGENTLESS_HOST_FACET: ClassVar["CsmAgentlessHostFacetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmAgentlessHostFacetType.AGENTLESS_HOST_FACET = CsmAgentlessHostFacetType("agentless_host_facet") diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_facets_response.py b/src/datadog_api_client/v2/model/csm_agentless_host_facets_response.py new file mode 100644 index 0000000000..7c933c53b1 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_facets_response.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_agentless_host_facet_data import CsmAgentlessHostFacetData + + +class CsmAgentlessHostFacetsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_agentless_host_facet_data import CsmAgentlessHostFacetData + + return { + "data": ([CsmAgentlessHostFacetData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CsmAgentlessHostFacetData], **kwargs): + """ + The response returned when listing facets for agentless hosts. + + :param data: The list of available facets for agentless hosts. + :type data: [CsmAgentlessHostFacetData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_resource_type.py b/src/datadog_api_client/v2/model/csm_agentless_host_resource_type.py new file mode 100644 index 0000000000..22efe8e5b5 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_resource_type.py @@ -0,0 +1,46 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmAgentlessHostResourceType(ModelSimple): + """ + The type of cloud resource for an agentless host. + + :param value: Must be one of ["aws_ec2_instance", "azure_virtual_machine_instance", "gcp_compute_instance", "oci_instance"]. + :type value: str + """ + + allowed_values = { + "aws_ec2_instance", + "azure_virtual_machine_instance", + "gcp_compute_instance", + "oci_instance", + } + AWS_EC2_INSTANCE: ClassVar["CsmAgentlessHostResourceType"] + AZURE_VIRTUAL_MACHINE_INSTANCE: ClassVar["CsmAgentlessHostResourceType"] + GCP_COMPUTE_INSTANCE: ClassVar["CsmAgentlessHostResourceType"] + OCI_INSTANCE: ClassVar["CsmAgentlessHostResourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmAgentlessHostResourceType.AWS_EC2_INSTANCE = CsmAgentlessHostResourceType("aws_ec2_instance") +CsmAgentlessHostResourceType.AZURE_VIRTUAL_MACHINE_INSTANCE = CsmAgentlessHostResourceType( + "azure_virtual_machine_instance" +) +CsmAgentlessHostResourceType.GCP_COMPUTE_INSTANCE = CsmAgentlessHostResourceType("gcp_compute_instance") +CsmAgentlessHostResourceType.OCI_INSTANCE = CsmAgentlessHostResourceType("oci_instance") diff --git a/src/datadog_api_client/v2/model/csm_agentless_host_type.py b/src/datadog_api_client/v2/model/csm_agentless_host_type.py new file mode 100644 index 0000000000..5c9463fe0e --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_host_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmAgentlessHostType(ModelSimple): + """ + The JSON:API type for agentless host resources. The value should always be `agentless_host`. + + :param value: If omitted defaults to "agentless_host". Must be one of ["agentless_host"]. + :type value: str + """ + + allowed_values = { + "agentless_host", + } + AGENTLESS_HOST: ClassVar["CsmAgentlessHostType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmAgentlessHostType.AGENTLESS_HOST = CsmAgentlessHostType("agentless_host") diff --git a/src/datadog_api_client/v2/model/csm_agentless_hosts_response.py b/src/datadog_api_client/v2/model/csm_agentless_hosts_response.py new file mode 100644 index 0000000000..3896747113 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_agentless_hosts_response.py @@ -0,0 +1,48 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_agentless_host_data import CsmAgentlessHostData + from datadog_api_client.v2.model.csm_settings_meta import CsmSettingsMeta + + +class CsmAgentlessHostsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_agentless_host_data import CsmAgentlessHostData + from datadog_api_client.v2.model.csm_settings_meta import CsmSettingsMeta + + return { + "data": ([CsmAgentlessHostData],), + "meta": (CsmSettingsMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__(self_, data: List[CsmAgentlessHostData], meta: CsmSettingsMeta, **kwargs): + """ + The response returned when listing agentless hosts. + + :param data: The list of agentless hosts for the current page. + :type data: [CsmAgentlessHostData] + + :param meta: Pagination metadata for a CSM settings list response. + :type meta: CsmSettingsMeta + """ + super().__init__(kwargs) + + self_.data = data + self_.meta = meta diff --git a/src/datadog_api_client/v2/model/csm_cloud_provider.py b/src/datadog_api_client/v2/model/csm_cloud_provider.py new file mode 100644 index 0000000000..0103d2bf79 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_cloud_provider.py @@ -0,0 +1,44 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmCloudProvider(ModelSimple): + """ + The cloud provider of a host resource. + + :param value: Must be one of ["aws", "gcp", "azure", "oci"]. + :type value: str + """ + + allowed_values = { + "aws", + "gcp", + "azure", + "oci", + } + AWS: ClassVar["CsmCloudProvider"] + GCP: ClassVar["CsmCloudProvider"] + AZURE: ClassVar["CsmCloudProvider"] + OCI: ClassVar["CsmCloudProvider"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmCloudProvider.AWS = CsmCloudProvider("aws") +CsmCloudProvider.GCP = CsmCloudProvider("gcp") +CsmCloudProvider.AZURE = CsmCloudProvider("azure") +CsmCloudProvider.OCI = CsmCloudProvider("oci") diff --git a/src/datadog_api_client/v2/model/csm_facet_info_type.py b/src/datadog_api_client/v2/model/csm_facet_info_type.py new file mode 100644 index 0000000000..e61e1d7ad7 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_facet_info_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmFacetInfoType(ModelSimple): + """ + The JSON:API type for facet info resources. The value should always be `facet_info`. + + :param value: If omitted defaults to "facet_info". Must be one of ["facet_info"]. + :type value: str + """ + + allowed_values = { + "facet_info", + } + FACET_INFO: ClassVar["CsmFacetInfoType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmFacetInfoType.FACET_INFO = CsmFacetInfoType("facet_info") diff --git a/src/datadog_api_client/v2/model/csm_host_facet_info_attributes.py b/src/datadog_api_client/v2/model/csm_host_facet_info_attributes.py new file mode 100644 index 0000000000..2c1d432db5 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_host_facet_info_attributes.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_host_facet_info_item import CsmHostFacetInfoItem + + +class CsmHostFacetInfoAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_host_facet_info_item import CsmHostFacetInfoItem + + return { + "items": ([CsmHostFacetInfoItem],), + } + + attribute_map = { + "items": "items", + } + + def __init__(self_, items: List[CsmHostFacetInfoItem], **kwargs): + """ + Attributes of a facet info response, containing the value distribution for the requested facet. + + :param items: The list of facet value entries for the current page. + :type items: [CsmHostFacetInfoItem] + """ + super().__init__(kwargs) + + self_.items = items diff --git a/src/datadog_api_client/v2/model/csm_host_facet_info_data.py b/src/datadog_api_client/v2/model/csm_host_facet_info_data.py new file mode 100644 index 0000000000..0f0c887951 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_host_facet_info_data.py @@ -0,0 +1,69 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_host_facet_info_attributes import CsmHostFacetInfoAttributes + from datadog_api_client.v2.model.csm_host_facet_info_meta import CsmHostFacetInfoMeta + from datadog_api_client.v2.model.csm_facet_info_type import CsmFacetInfoType + + +class CsmHostFacetInfoData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_host_facet_info_attributes import CsmHostFacetInfoAttributes + from datadog_api_client.v2.model.csm_host_facet_info_meta import CsmHostFacetInfoMeta + from datadog_api_client.v2.model.csm_facet_info_type import CsmFacetInfoType + + return { + "attributes": (CsmHostFacetInfoAttributes,), + "id": (str,), + "meta": (CsmHostFacetInfoMeta,), + "type": (CsmFacetInfoType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "meta": "meta", + "type": "type", + } + + def __init__( + self_, + attributes: CsmHostFacetInfoAttributes, + id: str, + meta: CsmHostFacetInfoMeta, + type: CsmFacetInfoType, + **kwargs, + ): + """ + The data wrapper for a facet info response. + + :param attributes: Attributes of a facet info response, containing the value distribution for the requested facet. + :type attributes: CsmHostFacetInfoAttributes + + :param id: The identifier of the facet. + :type id: str + + :param meta: Metadata for the facet info response. + :type meta: CsmHostFacetInfoMeta + + :param type: The JSON:API type for facet info resources. The value should always be ``facet_info``. + :type type: CsmFacetInfoType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.meta = meta + self_.type = type diff --git a/src/datadog_api_client/v2/model/csm_host_facet_info_item.py b/src/datadog_api_client/v2/model/csm_host_facet_info_item.py new file mode 100644 index 0000000000..ebeb874263 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_host_facet_info_item.py @@ -0,0 +1,39 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CsmHostFacetInfoItem(ModelNormal): + @cached_property + def openapi_types(_): + return { + "count": (int,), + "value": (str,), + } + + attribute_map = { + "count": "count", + "value": "value", + } + + def __init__(self_, count: int, value: str, **kwargs): + """ + A single value and its occurrence count for a facet. + + :param count: The number of resources with this facet value. + :type count: int + + :param value: The facet value. + :type value: str + """ + super().__init__(kwargs) + + self_.count = count + self_.value = value diff --git a/src/datadog_api_client/v2/model/csm_host_facet_info_meta.py b/src/datadog_api_client/v2/model/csm_host_facet_info_meta.py new file mode 100644 index 0000000000..0335548a8c --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_host_facet_info_meta.py @@ -0,0 +1,33 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CsmHostFacetInfoMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "total_count": (int,), + } + + attribute_map = { + "total_count": "total_count", + } + + def __init__(self_, total_count: int, **kwargs): + """ + Metadata for the facet info response. + + :param total_count: The total number of distinct values for this facet. + :type total_count: int + """ + super().__init__(kwargs) + + self_.total_count = total_count diff --git a/src/datadog_api_client/v2/model/csm_host_facet_info_response.py b/src/datadog_api_client/v2/model/csm_host_facet_info_response.py new file mode 100644 index 0000000000..a46c1ff7f0 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_host_facet_info_response.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_host_facet_info_data import CsmHostFacetInfoData + + +class CsmHostFacetInfoResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_host_facet_info_data import CsmHostFacetInfoData + + return { + "data": (CsmHostFacetInfoData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: CsmHostFacetInfoData, **kwargs): + """ + The response returned when requesting value distribution for a specific facet. + + :param data: The data wrapper for a facet info response. + :type data: CsmHostFacetInfoData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/csm_settings_meta.py b/src/datadog_api_client/v2/model/csm_settings_meta.py new file mode 100644 index 0000000000..4b86a86ebf --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_settings_meta.py @@ -0,0 +1,45 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CsmSettingsMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "page_index": (int,), + "page_size": (int,), + "total_filtered": (int,), + } + + attribute_map = { + "page_index": "page_index", + "page_size": "page_size", + "total_filtered": "total_filtered", + } + + def __init__(self_, page_index: int, page_size: int, total_filtered: int, **kwargs): + """ + Pagination metadata for a CSM settings list response. + + :param page_index: The current page index (zero-based). + :type page_index: int + + :param page_size: The number of resources returned per page. + :type page_size: int + + :param total_filtered: The total number of resources matching the filter criteria. + :type total_filtered: int + """ + super().__init__(kwargs) + + self_.page_index = page_index + self_.page_size = page_size + self_.total_filtered = total_filtered diff --git a/src/datadog_api_client/v2/model/csm_unified_host_attributes.py b/src/datadog_api_client/v2/model/csm_unified_host_attributes.py new file mode 100644 index 0000000000..c3a3a05b7d --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_host_attributes.py @@ -0,0 +1,179 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_cloud_provider import CsmCloudProvider + from datadog_api_client.v2.model.csm_agentless_host_resource_type import CsmAgentlessHostResourceType + from datadog_api_client.v2.model.csm_unified_host_source import CsmUnifiedHostSource + + +class CsmUnifiedHostAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_cloud_provider import CsmCloudProvider + from datadog_api_client.v2.model.csm_agentless_host_resource_type import CsmAgentlessHostResourceType + from datadog_api_client.v2.model.csm_unified_host_source import CsmUnifiedHostSource + + return { + "account_id": (str, none_type), + "agent_csm_vm_containers_enabled": (bool, none_type), + "agent_csm_vm_hosts_enabled": (bool, none_type), + "agent_cws_enabled": (bool, none_type), + "agent_posture_management": (bool, none_type), + "agent_version": (str, none_type), + "agentless_posture_management": (bool, none_type), + "agentless_vulnerability_scanning": (bool, none_type), + "cloud_provider": (CsmCloudProvider,), + "cluster_name": (str, none_type), + "datadog_agent_key": (str, none_type), + "env": ([str], none_type), + "host_id": (int, none_type), + "install_method_tool": (str, none_type), + "os": (str, none_type), + "resource_type": (CsmAgentlessHostResourceType,), + "source": (CsmUnifiedHostSource,), + } + + attribute_map = { + "account_id": "account_id", + "agent_csm_vm_containers_enabled": "agent_csm_vm_containers_enabled", + "agent_csm_vm_hosts_enabled": "agent_csm_vm_hosts_enabled", + "agent_cws_enabled": "agent_cws_enabled", + "agent_posture_management": "agent_posture_management", + "agent_version": "agent_version", + "agentless_posture_management": "agentless_posture_management", + "agentless_vulnerability_scanning": "agentless_vulnerability_scanning", + "cloud_provider": "cloud_provider", + "cluster_name": "cluster_name", + "datadog_agent_key": "datadog_agent_key", + "env": "env", + "host_id": "host_id", + "install_method_tool": "install_method_tool", + "os": "os", + "resource_type": "resource_type", + "source": "source", + } + + def __init__( + self_, + source: CsmUnifiedHostSource, + account_id: Union[str, none_type, UnsetType] = unset, + agent_csm_vm_containers_enabled: Union[bool, none_type, UnsetType] = unset, + agent_csm_vm_hosts_enabled: Union[bool, none_type, UnsetType] = unset, + agent_cws_enabled: Union[bool, none_type, UnsetType] = unset, + agent_posture_management: Union[bool, none_type, UnsetType] = unset, + agent_version: Union[str, none_type, UnsetType] = unset, + agentless_posture_management: Union[bool, none_type, UnsetType] = unset, + agentless_vulnerability_scanning: Union[bool, none_type, UnsetType] = unset, + cloud_provider: Union[CsmCloudProvider, UnsetType] = unset, + cluster_name: Union[str, none_type, UnsetType] = unset, + datadog_agent_key: Union[str, none_type, UnsetType] = unset, + env: Union[List[str], none_type, UnsetType] = unset, + host_id: Union[int, none_type, UnsetType] = unset, + install_method_tool: Union[str, none_type, UnsetType] = unset, + os: Union[str, none_type, UnsetType] = unset, + resource_type: Union[CsmAgentlessHostResourceType, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a unified host, combining data from agent and agentless sources. + + :param account_id: The ID of the cloud account that the host belongs to. Present only when the host was discovered through agentless scanning. + :type account_id: str, none_type, optional + + :param agent_csm_vm_containers_enabled: Whether CSM Vulnerabilities is enabled for containers through the Datadog Agent. ``true`` if enabled; ``false`` if disabled. + :type agent_csm_vm_containers_enabled: bool, none_type, optional + + :param agent_csm_vm_hosts_enabled: Whether CSM Vulnerabilities is enabled for hosts through the Datadog Agent. ``true`` if enabled; ``false`` if disabled. + :type agent_csm_vm_hosts_enabled: bool, none_type, optional + + :param agent_cws_enabled: Whether CSM Threats is enabled for this host through the Datadog Agent. ``true`` if enabled; ``false`` if disabled. + :type agent_cws_enabled: bool, none_type, optional + + :param agent_posture_management: Whether CSM Misconfigurations is enabled for this host through the Datadog Agent. ``true`` if enabled; ``false`` if disabled. + :type agent_posture_management: bool, none_type, optional + + :param agent_version: The version of the Datadog Agent running on this host. + :type agent_version: str, none_type, optional + + :param agentless_posture_management: Whether CSM Misconfigurations is enabled for this host via agentless scanning. ``true`` if enabled; ``false`` if disabled. + :type agentless_posture_management: bool, none_type, optional + + :param agentless_vulnerability_scanning: Whether CSM Vulnerabilities is enabled for this host via agentless scanning. ``true`` if enabled; ``false`` if disabled. + :type agentless_vulnerability_scanning: bool, none_type, optional + + :param cloud_provider: The cloud provider of a host resource. + :type cloud_provider: CsmCloudProvider, optional + + :param cluster_name: The name of the Kubernetes cluster the host belongs to, if applicable. + :type cluster_name: str, none_type, optional + + :param datadog_agent_key: The Datadog Agent key associated with this host. Present only for agent-sourced hosts. + :type datadog_agent_key: str, none_type, optional + + :param env: The list of environment tags associated with this host. + :type env: [str], none_type, optional + + :param host_id: The internal Datadog host identifier. Present only for agent-sourced hosts. + :type host_id: int, none_type, optional + + :param install_method_tool: The tool used to install the Datadog Agent on this host. + :type install_method_tool: str, none_type, optional + + :param os: The operating system of the host. Present only for agent-sourced hosts. + :type os: str, none_type, optional + + :param resource_type: The type of cloud resource for an agentless host. + :type resource_type: CsmAgentlessHostResourceType, optional + + :param source: The source of a unified host entry, indicating whether it was discovered via agent, agentless scanning, or both. + :type source: CsmUnifiedHostSource + """ + if account_id is not unset: + kwargs["account_id"] = account_id + if agent_csm_vm_containers_enabled is not unset: + kwargs["agent_csm_vm_containers_enabled"] = agent_csm_vm_containers_enabled + if agent_csm_vm_hosts_enabled is not unset: + kwargs["agent_csm_vm_hosts_enabled"] = agent_csm_vm_hosts_enabled + if agent_cws_enabled is not unset: + kwargs["agent_cws_enabled"] = agent_cws_enabled + if agent_posture_management is not unset: + kwargs["agent_posture_management"] = agent_posture_management + if agent_version is not unset: + kwargs["agent_version"] = agent_version + if agentless_posture_management is not unset: + kwargs["agentless_posture_management"] = agentless_posture_management + if agentless_vulnerability_scanning is not unset: + kwargs["agentless_vulnerability_scanning"] = agentless_vulnerability_scanning + if cloud_provider is not unset: + kwargs["cloud_provider"] = cloud_provider + if cluster_name is not unset: + kwargs["cluster_name"] = cluster_name + if datadog_agent_key is not unset: + kwargs["datadog_agent_key"] = datadog_agent_key + if env is not unset: + kwargs["env"] = env + if host_id is not unset: + kwargs["host_id"] = host_id + if install_method_tool is not unset: + kwargs["install_method_tool"] = install_method_tool + if os is not unset: + kwargs["os"] = os + if resource_type is not unset: + kwargs["resource_type"] = resource_type + super().__init__(kwargs) + + self_.source = source diff --git a/src/datadog_api_client/v2/model/csm_unified_host_data.py b/src/datadog_api_client/v2/model/csm_unified_host_data.py new file mode 100644 index 0000000000..2ab0382af1 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_host_data.py @@ -0,0 +1,54 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_unified_host_attributes import CsmUnifiedHostAttributes + from datadog_api_client.v2.model.csm_unified_host_type import CsmUnifiedHostType + + +class CsmUnifiedHostData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_unified_host_attributes import CsmUnifiedHostAttributes + from datadog_api_client.v2.model.csm_unified_host_type import CsmUnifiedHostType + + return { + "attributes": (CsmUnifiedHostAttributes,), + "id": (str,), + "type": (CsmUnifiedHostType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: CsmUnifiedHostAttributes, id: str, type: CsmUnifiedHostType, **kwargs): + """ + A single unified host resource, combining agent and agentless data. + + :param attributes: Attributes of a unified host, combining data from agent and agentless sources. + :type attributes: CsmUnifiedHostAttributes + + :param id: The resource identifier of the unified host. + :type id: str + + :param type: The JSON:API type for unified host resources. The value should always be ``unified_host``. + :type type: CsmUnifiedHostType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/csm_unified_host_facet_data.py b/src/datadog_api_client/v2/model/csm_unified_host_facet_data.py new file mode 100644 index 0000000000..89bb8343a8 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_host_facet_data.py @@ -0,0 +1,54 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_agentless_host_facet_attributes import CsmAgentlessHostFacetAttributes + from datadog_api_client.v2.model.csm_unified_host_facet_type import CsmUnifiedHostFacetType + + +class CsmUnifiedHostFacetData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_agentless_host_facet_attributes import CsmAgentlessHostFacetAttributes + from datadog_api_client.v2.model.csm_unified_host_facet_type import CsmUnifiedHostFacetType + + return { + "attributes": (CsmAgentlessHostFacetAttributes,), + "id": (str,), + "type": (CsmUnifiedHostFacetType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: CsmAgentlessHostFacetAttributes, id: str, type: CsmUnifiedHostFacetType, **kwargs): + """ + A single unified host facet resource. + + :param attributes: Attributes of an agentless host facet. + :type attributes: CsmAgentlessHostFacetAttributes + + :param id: The identifier of the facet, corresponding to the field path. + :type id: str + + :param type: The JSON:API type for unified host facet resources. The value should always be ``unified_host_facet``. + :type type: CsmUnifiedHostFacetType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/csm_unified_host_facet_type.py b/src/datadog_api_client/v2/model/csm_unified_host_facet_type.py new file mode 100644 index 0000000000..b70d7a4f8d --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_host_facet_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmUnifiedHostFacetType(ModelSimple): + """ + The JSON:API type for unified host facet resources. The value should always be `unified_host_facet`. + + :param value: If omitted defaults to "unified_host_facet". Must be one of ["unified_host_facet"]. + :type value: str + """ + + allowed_values = { + "unified_host_facet", + } + UNIFIED_HOST_FACET: ClassVar["CsmUnifiedHostFacetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmUnifiedHostFacetType.UNIFIED_HOST_FACET = CsmUnifiedHostFacetType("unified_host_facet") diff --git a/src/datadog_api_client/v2/model/csm_unified_host_facets_response.py b/src/datadog_api_client/v2/model/csm_unified_host_facets_response.py new file mode 100644 index 0000000000..9c3435ded0 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_host_facets_response.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_unified_host_facet_data import CsmUnifiedHostFacetData + + +class CsmUnifiedHostFacetsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_unified_host_facet_data import CsmUnifiedHostFacetData + + return { + "data": ([CsmUnifiedHostFacetData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CsmUnifiedHostFacetData], **kwargs): + """ + The response returned when listing facets for unified hosts. + + :param data: The list of available facets for unified hosts. + :type data: [CsmUnifiedHostFacetData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/csm_unified_host_source.py b/src/datadog_api_client/v2/model/csm_unified_host_source.py new file mode 100644 index 0000000000..cfead0b951 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_host_source.py @@ -0,0 +1,41 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmUnifiedHostSource(ModelSimple): + """ + The source of a unified host entry, indicating whether it was discovered via agent, agentless scanning, or both. + + :param value: Must be one of ["agent", "agentless", "both"]. + :type value: str + """ + + allowed_values = { + "agent", + "agentless", + "both", + } + AGENT: ClassVar["CsmUnifiedHostSource"] + AGENTLESS: ClassVar["CsmUnifiedHostSource"] + BOTH: ClassVar["CsmUnifiedHostSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmUnifiedHostSource.AGENT = CsmUnifiedHostSource("agent") +CsmUnifiedHostSource.AGENTLESS = CsmUnifiedHostSource("agentless") +CsmUnifiedHostSource.BOTH = CsmUnifiedHostSource("both") diff --git a/src/datadog_api_client/v2/model/csm_unified_host_type.py b/src/datadog_api_client/v2/model/csm_unified_host_type.py new file mode 100644 index 0000000000..027a44d4fd --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_host_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CsmUnifiedHostType(ModelSimple): + """ + The JSON:API type for unified host resources. The value should always be `unified_host`. + + :param value: If omitted defaults to "unified_host". Must be one of ["unified_host"]. + :type value: str + """ + + allowed_values = { + "unified_host", + } + UNIFIED_HOST: ClassVar["CsmUnifiedHostType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CsmUnifiedHostType.UNIFIED_HOST = CsmUnifiedHostType("unified_host") diff --git a/src/datadog_api_client/v2/model/csm_unified_hosts_meta.py b/src/datadog_api_client/v2/model/csm_unified_hosts_meta.py new file mode 100644 index 0000000000..8576d1589f --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_hosts_meta.py @@ -0,0 +1,51 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CsmUnifiedHostsMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "page_index": (int,), + "page_size": (int,), + "total_filtered": (int,), + "total_pages": (int,), + } + + attribute_map = { + "page_index": "page_index", + "page_size": "page_size", + "total_filtered": "total_filtered", + "total_pages": "total_pages", + } + + def __init__(self_, page_index: int, page_size: int, total_filtered: int, total_pages: int, **kwargs): + """ + Pagination metadata for a unified hosts list response. + + :param page_index: The current page index (zero-based). + :type page_index: int + + :param page_size: The number of hosts returned per page. + :type page_size: int + + :param total_filtered: The total number of hosts matching the filter criteria. + :type total_filtered: int + + :param total_pages: The total number of pages available. + :type total_pages: int + """ + super().__init__(kwargs) + + self_.page_index = page_index + self_.page_size = page_size + self_.total_filtered = total_filtered + self_.total_pages = total_pages diff --git a/src/datadog_api_client/v2/model/csm_unified_hosts_response.py b/src/datadog_api_client/v2/model/csm_unified_hosts_response.py new file mode 100644 index 0000000000..fcffc21570 --- /dev/null +++ b/src/datadog_api_client/v2/model/csm_unified_hosts_response.py @@ -0,0 +1,48 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.csm_unified_host_data import CsmUnifiedHostData + from datadog_api_client.v2.model.csm_unified_hosts_meta import CsmUnifiedHostsMeta + + +class CsmUnifiedHostsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.csm_unified_host_data import CsmUnifiedHostData + from datadog_api_client.v2.model.csm_unified_hosts_meta import CsmUnifiedHostsMeta + + return { + "data": ([CsmUnifiedHostData],), + "meta": (CsmUnifiedHostsMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__(self_, data: List[CsmUnifiedHostData], meta: CsmUnifiedHostsMeta, **kwargs): + """ + The response returned when listing unified hosts. + + :param data: The list of unified hosts for the current page. + :type data: [CsmUnifiedHostData] + + :param meta: Pagination metadata for a unified hosts list response. + :type meta: CsmUnifiedHostsMeta + """ + super().__init__(kwargs) + + self_.data = data + self_.meta = meta diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 817d63c3f9..749e310dca 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1816,6 +1816,15 @@ from datadog_api_client.v2.model.create_workflow_response import CreateWorkflowResponse from datadog_api_client.v2.model.creator import Creator from datadog_api_client.v2.model.csm_agent_data import CsmAgentData +from datadog_api_client.v2.model.csm_agentless_host_attributes import CsmAgentlessHostAttributes +from datadog_api_client.v2.model.csm_agentless_host_data import CsmAgentlessHostData +from datadog_api_client.v2.model.csm_agentless_host_facet_attributes import CsmAgentlessHostFacetAttributes +from datadog_api_client.v2.model.csm_agentless_host_facet_data import CsmAgentlessHostFacetData +from datadog_api_client.v2.model.csm_agentless_host_facet_type import CsmAgentlessHostFacetType +from datadog_api_client.v2.model.csm_agentless_host_facets_response import CsmAgentlessHostFacetsResponse +from datadog_api_client.v2.model.csm_agentless_host_resource_type import CsmAgentlessHostResourceType +from datadog_api_client.v2.model.csm_agentless_host_type import CsmAgentlessHostType +from datadog_api_client.v2.model.csm_agentless_hosts_response import CsmAgentlessHostsResponse from datadog_api_client.v2.model.csm_agents_attributes import CsmAgentsAttributes from datadog_api_client.v2.model.csm_agents_response import CsmAgentsResponse from datadog_api_client.v2.model.csm_cloud_accounts_coverage_analysis_attributes import ( @@ -1825,7 +1834,14 @@ from datadog_api_client.v2.model.csm_cloud_accounts_coverage_analysis_response import ( CsmCloudAccountsCoverageAnalysisResponse, ) +from datadog_api_client.v2.model.csm_cloud_provider import CsmCloudProvider from datadog_api_client.v2.model.csm_coverage_analysis import CsmCoverageAnalysis +from datadog_api_client.v2.model.csm_facet_info_type import CsmFacetInfoType +from datadog_api_client.v2.model.csm_host_facet_info_attributes import CsmHostFacetInfoAttributes +from datadog_api_client.v2.model.csm_host_facet_info_data import CsmHostFacetInfoData +from datadog_api_client.v2.model.csm_host_facet_info_item import CsmHostFacetInfoItem +from datadog_api_client.v2.model.csm_host_facet_info_meta import CsmHostFacetInfoMeta +from datadog_api_client.v2.model.csm_host_facet_info_response import CsmHostFacetInfoResponse from datadog_api_client.v2.model.csm_hosts_and_containers_coverage_analysis_attributes import ( CsmHostsAndContainersCoverageAnalysisAttributes, ) @@ -1840,6 +1856,16 @@ ) from datadog_api_client.v2.model.csm_serverless_coverage_analysis_data import CsmServerlessCoverageAnalysisData from datadog_api_client.v2.model.csm_serverless_coverage_analysis_response import CsmServerlessCoverageAnalysisResponse +from datadog_api_client.v2.model.csm_settings_meta import CsmSettingsMeta +from datadog_api_client.v2.model.csm_unified_host_attributes import CsmUnifiedHostAttributes +from datadog_api_client.v2.model.csm_unified_host_data import CsmUnifiedHostData +from datadog_api_client.v2.model.csm_unified_host_facet_data import CsmUnifiedHostFacetData +from datadog_api_client.v2.model.csm_unified_host_facet_type import CsmUnifiedHostFacetType +from datadog_api_client.v2.model.csm_unified_host_facets_response import CsmUnifiedHostFacetsResponse +from datadog_api_client.v2.model.csm_unified_host_source import CsmUnifiedHostSource +from datadog_api_client.v2.model.csm_unified_host_type import CsmUnifiedHostType +from datadog_api_client.v2.model.csm_unified_hosts_meta import CsmUnifiedHostsMeta +from datadog_api_client.v2.model.csm_unified_hosts_response import CsmUnifiedHostsResponse from datadog_api_client.v2.model.custom_attribute_config import CustomAttributeConfig from datadog_api_client.v2.model.custom_attribute_config_attributes_create import CustomAttributeConfigAttributesCreate from datadog_api_client.v2.model.custom_attribute_config_create import CustomAttributeConfigCreate @@ -10332,18 +10358,44 @@ "CreateWorkflowResponse", "Creator", "CsmAgentData", + "CsmAgentlessHostAttributes", + "CsmAgentlessHostData", + "CsmAgentlessHostFacetAttributes", + "CsmAgentlessHostFacetData", + "CsmAgentlessHostFacetType", + "CsmAgentlessHostFacetsResponse", + "CsmAgentlessHostResourceType", + "CsmAgentlessHostType", + "CsmAgentlessHostsResponse", "CsmAgentsAttributes", "CsmAgentsResponse", "CsmCloudAccountsCoverageAnalysisAttributes", "CsmCloudAccountsCoverageAnalysisData", "CsmCloudAccountsCoverageAnalysisResponse", + "CsmCloudProvider", "CsmCoverageAnalysis", + "CsmFacetInfoType", + "CsmHostFacetInfoAttributes", + "CsmHostFacetInfoData", + "CsmHostFacetInfoItem", + "CsmHostFacetInfoMeta", + "CsmHostFacetInfoResponse", "CsmHostsAndContainersCoverageAnalysisAttributes", "CsmHostsAndContainersCoverageAnalysisData", "CsmHostsAndContainersCoverageAnalysisResponse", "CsmServerlessCoverageAnalysisAttributes", "CsmServerlessCoverageAnalysisData", "CsmServerlessCoverageAnalysisResponse", + "CsmSettingsMeta", + "CsmUnifiedHostAttributes", + "CsmUnifiedHostData", + "CsmUnifiedHostFacetData", + "CsmUnifiedHostFacetType", + "CsmUnifiedHostFacetsResponse", + "CsmUnifiedHostSource", + "CsmUnifiedHostType", + "CsmUnifiedHostsMeta", + "CsmUnifiedHostsResponse", "CustomAttributeConfig", "CustomAttributeConfigAttributesCreate", "CustomAttributeConfigCreate", diff --git a/tests/v2/features/csm_settings.feature b/tests/v2/features/csm_settings.feature new file mode 100644 index 0000000000..c28ca491f3 --- /dev/null +++ b/tests/v2/features/csm_settings.feature @@ -0,0 +1,85 @@ +@endpoint(csm-settings) @endpoint(csm-settings-v2) +Feature: CSM Settings + Datadog Cloud Security Management (CSM) Settings APIs allow you to list + and filter your cloud hosts monitored by CSM, covering both agentless and + agent-based discovery. For more information, see [Cloud Security Managemen + t](https://docs.datadoghq.com/security/cloud_security_management). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CSMSettings" API + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get agentless host facet info returns "Bad Request" response + Given operation "GetCSMAgentlessHostFacetInfo" enabled + And new "GetCSMAgentlessHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get agentless host facet info returns "OK" response + Given operation "GetCSMAgentlessHostFacetInfo" enabled + And new "GetCSMAgentlessHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get unified host facet info returns "Bad Request" response + Given operation "GetCSMUnifiedHostFacetInfo" enabled + And new "GetCSMUnifiedHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get unified host facet info returns "OK" response + Given operation "GetCSMUnifiedHostFacetInfo" enabled + And new "GetCSMUnifiedHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List agentless host facets returns "OK" response + Given operation "ListCSMAgentlessHostFacets" enabled + And new "ListCSMAgentlessHostFacets" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List agentless hosts returns "Bad Request" response + Given operation "ListCSMAgentlessHosts" enabled + And new "ListCSMAgentlessHosts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List agentless hosts returns "OK" response + Given operation "ListCSMAgentlessHosts" enabled + And new "ListCSMAgentlessHosts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List unified host facets returns "OK" response + Given operation "ListCSMUnifiedHostFacets" enabled + And new "ListCSMUnifiedHostFacets" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List unified hosts returns "Bad Request" response + Given operation "ListCSMUnifiedHosts" enabled + And new "ListCSMUnifiedHosts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List unified hosts returns "OK" response + Given operation "ListCSMUnifiedHosts" enabled + And new "ListCSMUnifiedHosts" request + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 9101d0155c..64ba52bc40 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -2031,6 +2031,42 @@ "type": "safe" } }, + "ListCSMAgentlessHosts": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "GetCSMAgentlessHostFacetInfo": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "ListCSMAgentlessHostFacets": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "ListCSMUnifiedHosts": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "GetCSMUnifiedHostFacetInfo": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "ListCSMUnifiedHostFacets": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, "GetCurrentUser": { "tag": "Users", "undo": {