diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d2192b7484..575e1e47c6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15878,6 +15878,78 @@ components: type: string nullable: true type: array + DORADeploymentFetchResponse: + description: Response for fetching a single deployment event. + properties: + data: + $ref: '#/components/schemas/DORADeploymentObject' + type: object + DORADeploymentObject: + description: A DORA deployment event. + example: + attributes: + custom_tags: + - language:java + - department:engineering + - region:us-east-1 + env: production + finished_at: 1693491984000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + service: shopist + started_at: 1693491974000000000 + team: backend + version: v1.12.07 + id: 4242fcdd31586083 + type: dora_deployment + properties: + attributes: + $ref: '#/components/schemas/DORADeploymentObjectAttributes' + id: + description: The ID of the deployment event. + type: string + type: + $ref: '#/components/schemas/DORADeploymentType' + type: object + DORADeploymentObjectAttributes: + description: The attributes of the deployment event. + properties: + custom_tags: + $ref: '#/components/schemas/DORACustomTags' + env: + description: Environment name to where the service was deployed. + example: production + type: string + finished_at: + description: Unix timestamp when the deployment finished. + example: 1693491984000000000 + format: int64 + type: integer + git: + $ref: '#/components/schemas/DORAGitInfo' + service: + description: Service name. + example: shopist + type: string + started_at: + description: Unix timestamp when the deployment started. + example: 1693491974000000000 + format: int64 + type: integer + team: + description: Name of the team owning the deployed service. + example: backend + type: string + version: + description: Version to correlate with APM Deployment Tracking. + example: v1.12.07 + type: string + required: + - service + - started_at + - finished_at + type: object DORADeploymentRequest: description: Request to create a DORA deployment event. properties: @@ -15968,18 +16040,53 @@ components: type: string x-enum-varnames: - DORA_DEPLOYMENT - DORAEvent: - description: A DORA event. + DORADeploymentsListResponse: + description: Response for the list deployments endpoint. + example: + data: + - attributes: + custom_tags: + - language:java + - department:engineering + - region:us-east-1 + env: production + finished_at: 1693491984000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + service: shopist + started_at: 1693491974000000000 + team: backend + version: v1.12.07 + id: 4242fcdd31586083 + type: dora_deployment + - attributes: + custom_tags: + - language:go + - department:platform + env: production + finished_at: 1693492084000000000 + git: + commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 + repository_url: https://github.com/organization/api-service + service: api-service + started_at: 1693492074000000000 + team: backend + version: v2.1.0 + id: 4242fcdd31586084 + type: dora_deployment properties: - attributes: - description: The attributes of the event. - type: object - id: - description: The ID of the event. - type: string - type: - description: The type of the event. - type: string + data: + description: The list of DORA deployment events. + items: + $ref: '#/components/schemas/DORADeploymentObject' + type: array + type: object + DORAFailureFetchResponse: + description: Response for fetching a single failure event. + properties: + data: + $ref: '#/components/schemas/DORAIncidentObject' type: object DORAFailureRequest: description: Request to create a DORA failure event. @@ -16083,11 +16190,45 @@ components: type: string x-enum-varnames: - DORA_FAILURE - DORAFetchResponse: - description: Response for the DORA fetch endpoints. + DORAFailuresListResponse: + description: Response for the list failures endpoint. + example: + data: + - attributes: + custom_tags: + - incident_type:database + - department:engineering + env: production + finished_at: 1693492274000000000 + name: Database outage + services: + - shopist + severity: SEV-1 + started_at: 1693492174000000000 + team: backend + id: 4242fcdd31586085 + type: dora_incident + - attributes: + custom_tags: + - incident_type:service_down + - department:platform + env: production + finished_at: 1693492474000000000 + name: API service outage + services: + - api-service + - payment-service + severity: SEV-2 + started_at: 1693492374000000000 + team: backend + id: 4242fcdd31586086 + type: dora_incident properties: data: - $ref: '#/components/schemas/DORAEvent' + description: The list of DORA incident events. + items: + $ref: '#/components/schemas/DORAIncidentObject' + type: array type: object DORAGitInfo: description: Git info for DORA Metrics events. @@ -16100,6 +16241,82 @@ components: - repository_url - commit_sha type: object + DORAIncidentObject: + description: A DORA incident event. + example: + attributes: + custom_tags: + - incident_type:database + - department:engineering + env: production + finished_at: 1693492274000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + name: Database outage + services: + - shopist + severity: SEV-1 + started_at: 1693492174000000000 + team: backend + id: 4242fcdd31586085 + type: dora_incident + properties: + attributes: + $ref: '#/components/schemas/DORAIncidentObjectAttributes' + id: + description: The ID of the incident event. + type: string + type: + $ref: '#/components/schemas/DORAFailureType' + type: object + DORAIncidentObjectAttributes: + description: The attributes of the incident event. + properties: + custom_tags: + $ref: '#/components/schemas/DORACustomTags' + env: + description: Environment name that was impacted by the incident. + example: production + type: string + finished_at: + description: Unix timestamp when the incident finished. + example: 1693491984000000000 + format: int64 + type: integer + git: + $ref: '#/components/schemas/DORAGitInfo' + name: + description: Incident name. + example: Database outage + type: string + services: + description: Service names impacted by the incident. + example: + - shopist + items: + type: string + type: array + severity: + description: Incident severity. + example: SEV-1 + type: string + started_at: + description: Unix timestamp when the incident started. + example: 1693491974000000000 + format: int64 + type: integer + team: + description: Name of the team owning the services impacted. + example: backend + type: string + version: + description: Version to correlate with APM Deployment Tracking. + example: v1.12.07 + type: string + required: + - started_at + type: object DORAListDeploymentsRequest: description: Request to get a list of deployments. example: @@ -16119,32 +16336,31 @@ components: type: object DORAListDeploymentsRequestAttributes: description: Attributes to get a list of deployments. - example: - from: '2025-01-01T00:00:00Z' - limit: 500 - query: service:(shopist OR api-service OR payment-service) env:(production - OR staging) team:(backend OR platform) - sort: -started_at - to: '2025-01-31T23:59:59Z' properties: from: description: Minimum timestamp for requested events. + example: '2025-01-01T00:00:00Z' format: date-time type: string limit: default: 10 description: Maximum number of events in the response. + example: 500 format: int32 maximum: 1000 type: integer query: description: Search query with event platform syntax. + example: service:(shopist OR api-service OR payment-service) env:(production + OR staging) team:(backend OR platform) type: string sort: description: Sort order (prefixed with `-` for descending). + example: -started_at type: string to: description: Maximum timestamp for requested events. + example: '2025-01-31T23:59:59Z' format: date-time type: string type: object @@ -16167,9 +16383,11 @@ components: - attributes type: object DORAListDeploymentsRequestDataType: + default: dora_deployments_list_request description: The definition of `DORAListDeploymentsRequestDataType` object. enum: - dora_deployments_list_request + example: dora_deployments_list_request type: string x-enum-varnames: - DORA_DEPLOYMENTS_LIST_REQUEST @@ -16192,32 +16410,31 @@ components: type: object DORAListFailuresRequestAttributes: description: Attributes to get a list of failures. - example: - from: '2025-01-01T00:00:00Z' - limit: 500 - query: severity:(SEV-1 OR SEV-2) env:(production OR staging) service:(shopist - OR api-service OR payment-service) team:(backend OR platform OR payments) - sort: -started_at - to: '2025-01-31T23:59:59Z' properties: from: description: Minimum timestamp for requested events. + example: '2025-01-01T00:00:00Z' format: date-time type: string limit: default: 10 description: Maximum number of events in the response. + example: 500 format: int32 maximum: 1000 type: integer query: description: Search query with event platform syntax. + example: severity:(SEV-1 OR SEV-2) env:(production OR staging) service:(shopist + OR api-service OR payment-service) team:(backend OR platform OR payments) type: string sort: description: Sort order (prefixed with `-` for descending). + example: -started_at type: string to: description: Maximum timestamp for requested events. + example: '2025-01-31T23:59:59Z' format: date-time type: string type: object @@ -16240,54 +16457,14 @@ components: - attributes type: object DORAListFailuresRequestDataType: + default: dora_failures_list_request description: The definition of `DORAListFailuresRequestDataType` object. enum: - dora_failures_list_request + example: dora_failures_list_request type: string x-enum-varnames: - DORA_FAILURES_LIST_REQUEST - DORAListResponse: - description: Response for the DORA list endpoints. - example: - data: - - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: production - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - service: shopist - started_at: 1693491974000000000 - team: backend - version: v1.12.07 - id: 4242fcdd31586083 - type: dora_deployment - - attributes: - custom_tags: - - language:go - - department:platform - env: production - finished_at: 1693492084000000000 - git: - commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 - repository_url: https://github.com/organization/api-service - service: api-service - started_at: 1693492074000000000 - team: backend - version: v2.1.0 - id: 4242fcdd31586084 - type: dora_deployment - properties: - data: - description: The list of DORA events. - items: - $ref: '#/components/schemas/DORAEvent' - type: array - type: object DashboardListAddItemsRequest: description: Request containing a list of dashboards to add. properties: @@ -17278,6 +17455,70 @@ components: required: - data type: object + DeletedSuiteResponseData: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuiteResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/SyntheticsSuiteTypes' + type: object + DeletedSuiteResponseDataAttributes: + properties: + deleted_at: + description: Deletion timestamp of the Synthetic suite ID. + type: string + public_id: + description: The Synthetic suite ID deleted. + type: string + type: object + DeletedSuitesRequestDelete: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteAttributes' + id: + type: string + type: + $ref: '#/components/schemas/DeletedSuitesRequestType' + required: + - attributes + type: object + DeletedSuitesRequestDeleteAttributes: + properties: + force_delete_dependencies: + type: boolean + public_ids: + example: + - '' + items: + type: string + type: array + required: + - public_ids + type: object + DeletedSuitesRequestDeleteRequest: + properties: + data: + $ref: '#/components/schemas/DeletedSuitesRequestDelete' + required: + - data + type: object + DeletedSuitesRequestType: + default: delete_suites_request + enum: + - delete_suites_request + example: delete_suites_request + type: string + x-enum-varnames: + - DELETE_SUITES_REQUEST + DeletedSuitesResponse: + properties: + data: + items: + $ref: '#/components/schemas/DeletedSuiteResponseData' + type: array + type: object DependencyLocation: description: Static library vulnerability location. properties: @@ -53388,6 +53629,31 @@ components: format: double type: number type: object + SuiteCreateEdit: + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + type: + $ref: '#/components/schemas/SyntheticsSuiteTypes' + required: + - attributes + - type + type: object + SuiteCreateEditRequest: + properties: + data: + $ref: '#/components/schemas/SuiteCreateEdit' + required: + - data + type: object + SuiteSearchResponseType: + default: suites_search + enum: + - suites_search + example: suites_search + type: string + x-enum-varnames: + - SUITES_SEARCH SuppressionVersionHistory: description: Response object containing the version history of a suppression. properties: @@ -53414,6 +53680,137 @@ components: suppression: $ref: '#/components/schemas/SecurityMonitoringSuppressionAttributes' type: object + SyntheticsSuite: + description: Object containing details about a Synthetic suite. + properties: + message: + description: Notification message associated with the suite. + example: Notification message + type: string + name: + description: Name of the suite. + example: Example suite name + type: string + options: + $ref: '#/components/schemas/SyntheticsSuiteOptions' + public_id: + description: The public ID for the test. + example: 123-abc-456 + readOnly: true + type: string + tags: + description: Array of tags attached to the suite. + example: + - env:production + items: + description: A tag attached to the suite. + type: string + type: array + tests: + items: + $ref: '#/components/schemas/SyntheticsSuiteTest' + type: array + type: + $ref: '#/components/schemas/SyntheticsSuiteType' + required: + - name + - message + - type + - tests + - options + type: object + SyntheticsSuiteOptions: + description: Object describing the extra options for a Synthetic suite. + properties: + alerting_threshold: + description: Percentage of critical tests failure needed for a suite to + fail. + format: double + maximum: 1 + minimum: 0 + type: number + type: object + SyntheticsSuiteResponse: + description: Synthetics suite response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteResponseData' + type: object + SyntheticsSuiteResponseData: + description: Synthetics suite response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + type: object + SyntheticsSuiteSearchResponse: + description: Synthetics suite search response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseData' + type: object + SyntheticsSuiteSearchResponseData: + description: Synthetics suite search response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseDataAttributes' + id: + format: uuid + type: string + type: + $ref: '#/components/schemas/SuiteSearchResponseType' + type: object + SyntheticsSuiteSearchResponseDataAttributes: + description: Synthetics suite search response data attributes + properties: + suites: + items: + $ref: '#/components/schemas/SyntheticsSuite' + type: array + total: + format: int32 + maximum: 2147483647 + type: integer + type: object + SyntheticsSuiteTest: + description: Object containing details about a Synthetic test included in a + Synthetic suite. + properties: + alerting_criticality: + $ref: '#/components/schemas/SyntheticsSuiteTestAlertingCriticality' + public_id: + example: '' + type: string + required: + - public_id + type: object + SyntheticsSuiteTestAlertingCriticality: + description: Alerting criticality for each the test. + enum: + - ignore + - critical + example: critical + type: string + x-enum-varnames: + - IGNORE + - CRITICAL + SyntheticsSuiteType: + default: suite + description: Type of the Synthetic suite, `suite`. + enum: + - suite + example: suite + type: string + x-enum-varnames: + - SUITE + SyntheticsSuiteTypes: + default: suites + description: Type for the Synthetics suites responses, `suites`. + enum: + - suites + example: suites + type: string + x-enum-varnames: + - SUITES TableResultV2: description: A reference table resource containing its full configuration and state. @@ -67820,7 +68217,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DORAListResponse' + $ref: '#/components/schemas/DORADeploymentsListResponse' description: OK '400': content: @@ -67858,26 +68255,8 @@ paths: '200': content: application/json: - example: - data: - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: staging - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - service: shopist - started_at: 1693491974000000000 - team: backend - version: v1.12.07 - id: 4242fcdd31586083 - type: dora_deployment - schema: - $ref: '#/components/schemas/DORAFetchResponse' + schema: + $ref: '#/components/schemas/DORADeploymentFetchResponse' description: OK '400': content: @@ -67994,66 +68373,8 @@ paths: '200': content: application/json: - example: - data: - - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: production - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - name: Web server is down; all requests are failing. - services: - - shopist - severity: SEV-1 - started_at: 1693491974000000000 - team: backend - id: 4242fcdd31586085 - type: dora_failure - - attributes: - custom_tags: - - language:go - - department:platform - env: production - finished_at: 1693492084000000000 - git: - commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 - repository_url: https://github.com/organization/api-service - name: Database connection timeout - services: - - api-service - - payment-service - severity: SEV-1 - started_at: 1693492074000000000 - team: platform - version: v2.1.0 - id: 4242fcdd31586086 - type: dora_failure - - attributes: - custom_tags: - - language:python - - department:payments - - region:eu-west-1 - env: staging - finished_at: 1693492204000000000 - git: - commit_sha: 99edc9350f2cc9b250b69abddab733dd55e1a601 - repository_url: https://github.com/organization/payment-service - name: Payment gateway API rate limit exceeded - services: - - payment-service - severity: SEV-2 - started_at: 1693492174000000000 - team: payments - version: v1.8.3 - id: 4242fcdd31586087 - type: dora_failure - schema: - $ref: '#/components/schemas/DORAListResponse' + schema: + $ref: '#/components/schemas/DORAFailuresListResponse' description: OK '400': content: @@ -68091,28 +68412,8 @@ paths: '200': content: application/json: - example: - data: - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: staging - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - name: Web server is down; all requests are failing. - services: - - shopist - severity: High - started_at: 1693491974000000000 - team: backend - id: 4242fcdd31586085 - type: dora_failure - schema: - $ref: '#/components/schemas/DORAFetchResponse' + schema: + $ref: '#/components/schemas/DORAFailureFetchResponse' description: OK '400': content: @@ -86063,6 +86364,227 @@ paths: operator: OR permissions: - billing_edit + /api/v2/synthetics/suites: + post: + operationId: CreateSyntheticsSuite + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Create a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + - synthetics_create_edit_trigger + /api/v2/synthetics/suites/bulk-delete: + post: + operationId: DeleteSyntheticsSuites + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Bulk delete suites' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/synthetics/suites/search: + get: + description: Search for Synthetics suites. + operationId: SearchSuites + parameters: + - description: The search query. + in: query + name: query + required: false + schema: + type: string + - description: The sort order for the results (e.g., `name,asc` or `name,desc`). + in: query + name: sort + required: false + schema: + default: name,asc + type: string + - description: If true, return only facets instead of full test details. + in: query + name: facets_only + required: false + schema: + default: false + type: boolean + - description: The offset from which to start returning results. + in: query + name: start + required: false + schema: + default: 0 + format: int64 + type: integer + - description: The maximum number of results to return. + in: query + name: count + required: false + schema: + default: 50 + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Search Synthetics suites + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/suites/{public_id}: + get: + operationId: GetSyntheticsSuite + parameters: + - description: The public ID of the suite to get details from. + in: path + name: public_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: 'Synthetics: Get a suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + put: + operationId: EditSyntheticsSuite + parameters: + - description: The public ID of the suite to edit. + in: path + name: public_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + description: New suite details to be saved. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: edit a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write /api/v2/tags/enrichment: get: description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 2e859a4f0f..73fd60eda3 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6934,6 +6934,55 @@ datadog\_api\_client.v2.model.delete\_custom\_framework\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.deleted\_suite\_response\_data module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suite_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suite\_response\_data\_attributes module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suite_response_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_delete module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_delete + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_delete\_attributes module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_delete_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_delete\_request module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_delete_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_request\_type module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.deleted\_suites\_response module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.deleted_suites_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.dependency\_location module --------------------------------------------------------- @@ -7214,6 +7263,27 @@ datadog\_api\_client.v2.model.domain\_allowlist\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.dora\_deployment\_fetch\_response module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dora_deployment_fetch_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dora\_deployment\_object module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dora_deployment_object + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dora\_deployment\_object\_attributes module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dora_deployment_object_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.dora\_deployment\_request module -------------------------------------------------------------- @@ -7256,10 +7326,17 @@ datadog\_api\_client.v2.model.dora\_deployment\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.dora\_event module ------------------------------------------------- +datadog\_api\_client.v2.model.dora\_deployments\_list\_response module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dora_deployments_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dora\_failure\_fetch\_response module +------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.dora_event +.. automodule:: datadog_api_client.v2.model.dora_failure_fetch_response :members: :show-inheritance: @@ -7305,10 +7382,10 @@ datadog\_api\_client.v2.model.dora\_failure\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.dora\_fetch\_response module ----------------------------------------------------------- +datadog\_api\_client.v2.model.dora\_failures\_list\_response module +------------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.dora_fetch_response +.. automodule:: datadog_api_client.v2.model.dora_failures_list_response :members: :show-inheritance: @@ -7319,6 +7396,20 @@ datadog\_api\_client.v2.model.dora\_git\_info module :members: :show-inheritance: +datadog\_api\_client.v2.model.dora\_incident\_object module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dora_incident_object + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dora\_incident\_object\_attributes module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dora_incident_object_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.dora\_list\_deployments\_request module --------------------------------------------------------------------- @@ -7375,13 +7466,6 @@ datadog\_api\_client.v2.model.dora\_list\_failures\_request\_data\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.dora\_list\_response module ---------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.dora_list_response - :members: - :show-inheritance: - datadog\_api\_client.v2.model.downtime\_create\_request module -------------------------------------------------------------- @@ -23636,6 +23720,27 @@ datadog\_api\_client.v2.model.step\_display\_bounds module :members: :show-inheritance: +datadog\_api\_client.v2.model.suite\_create\_edit module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_create_edit + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.suite\_create\_edit\_request module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_create_edit_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.suite\_search\_response\_type module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.suite_search_response_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.suppression\_version\_history module ------------------------------------------------------------------ @@ -23650,6 +23755,83 @@ datadog\_api\_client.v2.model.suppression\_versions module :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_suite module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_options module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_options + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_response module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_response\_data module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_search\_response module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_search_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_search\_response\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_search_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_search\_response\_data\_attributes module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_test module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_test + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_test\_alerting\_criticality module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_type module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_suite\_types module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_suite_types + :members: + :show-inheritance: + datadog\_api\_client.v2.model.table\_result\_v2 module ------------------------------------------------------ diff --git a/examples/v2/synthetics/CreateSyntheticsSuite.py b/examples/v2/synthetics/CreateSyntheticsSuite.py new file mode 100644 index 0000000000..b2b6fe48d5 --- /dev/null +++ b/examples/v2/synthetics/CreateSyntheticsSuite.py @@ -0,0 +1,35 @@ +""" +Synthetics: Create a test suite returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi +from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite +from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions +from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType +from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes + +body = SuiteCreateEditRequest( + data=SuiteCreateEdit( + attributes=SyntheticsSuite( + message="Notification message", + name="Example suite name", + options=SyntheticsSuiteOptions(), + tags=[ + "env:production", + ], + tests=[], + type=SyntheticsSuiteType.SUITE, + ), + type=SyntheticsSuiteTypes.SUITES, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.create_synthetics_suite(body=body) + + print(response) diff --git a/examples/v2/synthetics/DeleteSyntheticsSuites.py b/examples/v2/synthetics/DeleteSyntheticsSuites.py new file mode 100644 index 0000000000..e0967da2f0 --- /dev/null +++ b/examples/v2/synthetics/DeleteSyntheticsSuites.py @@ -0,0 +1,28 @@ +""" +Synthetics: Bulk delete suites returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi +from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete +from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import DeletedSuitesRequestDeleteAttributes +from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest +from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType + +body = DeletedSuitesRequestDeleteRequest( + data=DeletedSuitesRequestDelete( + attributes=DeletedSuitesRequestDeleteAttributes( + public_ids=[ + "", + ], + ), + type=DeletedSuitesRequestType.DELETE_SUITES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.delete_synthetics_suites(body=body) + + print(response) diff --git a/examples/v2/synthetics/EditSyntheticsSuite.py b/examples/v2/synthetics/EditSyntheticsSuite.py new file mode 100644 index 0000000000..aad88d0770 --- /dev/null +++ b/examples/v2/synthetics/EditSyntheticsSuite.py @@ -0,0 +1,44 @@ +""" +Synthetics: edit a test suite returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi +from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite +from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions +from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest +from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, +) +from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType +from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes + +body = SuiteCreateEditRequest( + data=SuiteCreateEdit( + attributes=SyntheticsSuite( + message="Notification message", + name="Example suite name", + options=SyntheticsSuiteOptions(), + tags=[ + "env:production", + ], + tests=[ + SyntheticsSuiteTest( + alerting_criticality=SyntheticsSuiteTestAlertingCriticality.CRITICAL, + public_id="", + ), + ], + type=SyntheticsSuiteType.SUITE, + ), + type=SyntheticsSuiteTypes.SUITES, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.edit_synthetics_suite(public_id="public_id", body=body) + + print(response) diff --git a/examples/v2/synthetics/GetSyntheticsSuite.py b/examples/v2/synthetics/GetSyntheticsSuite.py new file mode 100644 index 0000000000..25371dfe80 --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsSuite.py @@ -0,0 +1,15 @@ +""" +Synthetics: Get a suite returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_synthetics_suite( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/SearchSuites.py b/examples/v2/synthetics/SearchSuites.py new file mode 100644 index 0000000000..564fdbd3ce --- /dev/null +++ b/examples/v2/synthetics/SearchSuites.py @@ -0,0 +1,13 @@ +""" +Search Synthetics suites returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.search_suites() + + print(response) diff --git a/src/datadog_api_client/v2/api/dora_metrics_api.py b/src/datadog_api_client/v2/api/dora_metrics_api.py index 6a9b219cc8..31f81aa5b4 100644 --- a/src/datadog_api_client/v2/api/dora_metrics_api.py +++ b/src/datadog_api_client/v2/api/dora_metrics_api.py @@ -10,12 +10,14 @@ from datadog_api_client.configuration import Configuration from datadog_api_client.v2.model.dora_deployment_response import DORADeploymentResponse from datadog_api_client.v2.model.dora_deployment_request import DORADeploymentRequest -from datadog_api_client.v2.model.dora_list_response import DORAListResponse +from datadog_api_client.v2.model.dora_deployments_list_response import DORADeploymentsListResponse from datadog_api_client.v2.model.dora_list_deployments_request import DORAListDeploymentsRequest -from datadog_api_client.v2.model.dora_fetch_response import DORAFetchResponse +from datadog_api_client.v2.model.dora_deployment_fetch_response import DORADeploymentFetchResponse from datadog_api_client.v2.model.dora_failure_response import DORAFailureResponse from datadog_api_client.v2.model.dora_failure_request import DORAFailureRequest +from datadog_api_client.v2.model.dora_failures_list_response import DORAFailuresListResponse from datadog_api_client.v2.model.dora_list_failures_request import DORAListFailuresRequest +from datadog_api_client.v2.model.dora_failure_fetch_response import DORAFailureFetchResponse class DORAMetricsApi: @@ -138,7 +140,7 @@ def __init__(self, api_client=None): self._get_dora_deployment_endpoint = _Endpoint( settings={ - "response_type": (DORAFetchResponse,), + "response_type": (DORADeploymentFetchResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], "endpoint_path": "/api/v2/dora/deployments/{deployment_id}", "operation_id": "get_dora_deployment", @@ -161,7 +163,7 @@ def __init__(self, api_client=None): self._get_dora_failure_endpoint = _Endpoint( settings={ - "response_type": (DORAFetchResponse,), + "response_type": (DORAFailureFetchResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], "endpoint_path": "/api/v2/dora/failures/{failure_id}", "operation_id": "get_dora_failure", @@ -184,7 +186,7 @@ def __init__(self, api_client=None): self._list_dora_deployments_endpoint = _Endpoint( settings={ - "response_type": (DORAListResponse,), + "response_type": (DORADeploymentsListResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], "endpoint_path": "/api/v2/dora/deployments", "operation_id": "list_dora_deployments", @@ -204,7 +206,7 @@ def __init__(self, api_client=None): self._list_dora_failures_endpoint = _Endpoint( settings={ - "response_type": (DORAListResponse,), + "response_type": (DORAFailuresListResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], "endpoint_path": "/api/v2/dora/failures", "operation_id": "list_dora_failures", @@ -326,14 +328,14 @@ def delete_dora_failure( def get_dora_deployment( self, deployment_id: str, - ) -> DORAFetchResponse: + ) -> DORADeploymentFetchResponse: """Get a deployment event. Use this API endpoint to get a deployment event. :param deployment_id: The ID of the deployment event. :type deployment_id: str - :rtype: DORAFetchResponse + :rtype: DORADeploymentFetchResponse """ kwargs: Dict[str, Any] = {} kwargs["deployment_id"] = deployment_id @@ -343,14 +345,14 @@ def get_dora_deployment( def get_dora_failure( self, failure_id: str, - ) -> DORAFetchResponse: + ) -> DORAFailureFetchResponse: """Get a failure event. Use this API endpoint to get a failure event. :param failure_id: The ID of the failure event. :type failure_id: str - :rtype: DORAFetchResponse + :rtype: DORAFailureFetchResponse """ kwargs: Dict[str, Any] = {} kwargs["failure_id"] = failure_id @@ -360,13 +362,13 @@ def get_dora_failure( def list_dora_deployments( self, body: DORAListDeploymentsRequest, - ) -> DORAListResponse: + ) -> DORADeploymentsListResponse: """Get a list of deployment events. Use this API endpoint to get a list of deployment events. :type body: DORAListDeploymentsRequest - :rtype: DORAListResponse + :rtype: DORADeploymentsListResponse """ kwargs: Dict[str, Any] = {} kwargs["body"] = body @@ -376,13 +378,13 @@ def list_dora_deployments( def list_dora_failures( self, body: DORAListFailuresRequest, - ) -> DORAListResponse: + ) -> DORAFailuresListResponse: """Get a list of failure events. Use this API endpoint to get a list of failure events. :type body: DORAListFailuresRequest - :rtype: DORAListResponse + :rtype: DORAFailuresListResponse """ kwargs: Dict[str, Any] = {} kwargs["body"] = body diff --git a/src/datadog_api_client/v2/api/synthetics_api.py b/src/datadog_api_client/v2/api/synthetics_api.py index 7d8b21f8e3..00f5f43cda 100644 --- a/src/datadog_api_client/v2/api/synthetics_api.py +++ b/src/datadog_api_client/v2/api/synthetics_api.py @@ -3,12 +3,21 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict +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.on_demand_concurrency_cap_response import OnDemandConcurrencyCapResponse from datadog_api_client.v2.model.on_demand_concurrency_cap_attributes import OnDemandConcurrencyCapAttributes +from datadog_api_client.v2.model.synthetics_suite_response import SyntheticsSuiteResponse +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.deleted_suites_response import DeletedSuitesResponse +from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest +from datadog_api_client.v2.model.synthetics_suite_search_response import SyntheticsSuiteSearchResponse class SyntheticsApi: @@ -27,6 +36,72 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._create_synthetics_suite_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites", + "operation_id": "create_synthetics_suite", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (SuiteCreateEditRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._delete_synthetics_suites_endpoint = _Endpoint( + settings={ + "response_type": (DeletedSuitesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/bulk-delete", + "operation_id": "delete_synthetics_suites", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (DeletedSuitesRequestDeleteRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._edit_synthetics_suite_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/{public_id}", + "operation_id": "edit_synthetics_suite", + "http_method": "PUT", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (SuiteCreateEditRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._get_on_demand_concurrency_cap_endpoint = _Endpoint( settings={ "response_type": (OnDemandConcurrencyCapResponse,), @@ -43,6 +118,71 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_synthetics_suite_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/{public_id}", + "operation_id": "get_synthetics_suite", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._search_suites_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteSearchResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/search", + "operation_id": "search_suites", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + "sort": { + "openapi_types": (str,), + "attribute": "sort", + "location": "query", + }, + "facets_only": { + "openapi_types": (bool,), + "attribute": "facets_only", + "location": "query", + }, + "start": { + "openapi_types": (int,), + "attribute": "start", + "location": "query", + }, + "count": { + "openapi_types": (int,), + "attribute": "count", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._set_on_demand_concurrency_cap_endpoint = _Endpoint( settings={ "response_type": (OnDemandConcurrencyCapResponse,), @@ -63,6 +203,54 @@ def __init__(self, api_client=None): api_client=api_client, ) + def create_synthetics_suite( + self, + body: SuiteCreateEditRequest, + ) -> SyntheticsSuiteResponse: + """Synthetics: Create a test suite. + + :type body: SuiteCreateEditRequest + :rtype: SyntheticsSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_synthetics_suite_endpoint.call_with_http_info(**kwargs) + + def delete_synthetics_suites( + self, + body: DeletedSuitesRequestDeleteRequest, + ) -> DeletedSuitesResponse: + """Synthetics: Bulk delete suites. + + :type body: DeletedSuitesRequestDeleteRequest + :rtype: DeletedSuitesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._delete_synthetics_suites_endpoint.call_with_http_info(**kwargs) + + def edit_synthetics_suite( + self, + public_id: str, + body: SuiteCreateEditRequest, + ) -> SyntheticsSuiteResponse: + """Synthetics: edit a test suite. + + :param public_id: The public ID of the suite to edit. + :type public_id: str + :param body: New suite details to be saved. + :type body: SuiteCreateEditRequest + :rtype: SyntheticsSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + kwargs["body"] = body + + return self._edit_synthetics_suite_endpoint.call_with_http_info(**kwargs) + def get_on_demand_concurrency_cap( self, ) -> OnDemandConcurrencyCapResponse: @@ -75,6 +263,64 @@ def get_on_demand_concurrency_cap( kwargs: Dict[str, Any] = {} return self._get_on_demand_concurrency_cap_endpoint.call_with_http_info(**kwargs) + def get_synthetics_suite( + self, + public_id: str, + ) -> SyntheticsSuiteResponse: + """Synthetics: Get a suite. + + :param public_id: The public ID of the suite to get details from. + :type public_id: str + :rtype: SyntheticsSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + return self._get_synthetics_suite_endpoint.call_with_http_info(**kwargs) + + def search_suites( + self, + *, + query: Union[str, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + facets_only: Union[bool, UnsetType] = unset, + start: Union[int, UnsetType] = unset, + count: Union[int, UnsetType] = unset, + ) -> SyntheticsSuiteSearchResponse: + """Search Synthetics suites. + + Search for Synthetics suites. + + :param query: The search query. + :type query: str, optional + :param sort: The sort order for the results (e.g., ``name,asc`` or ``name,desc`` ). + :type sort: str, optional + :param facets_only: If true, return only facets instead of full test details. + :type facets_only: bool, optional + :param start: The offset from which to start returning results. + :type start: int, optional + :param count: The maximum number of results to return. + :type count: int, optional + :rtype: SyntheticsSuiteSearchResponse + """ + kwargs: Dict[str, Any] = {} + if query is not unset: + kwargs["query"] = query + + if sort is not unset: + kwargs["sort"] = sort + + if facets_only is not unset: + kwargs["facets_only"] = facets_only + + if start is not unset: + kwargs["start"] = start + + if count is not unset: + kwargs["count"] = count + + return self._search_suites_endpoint.call_with_http_info(**kwargs) + def set_on_demand_concurrency_cap( self, body: OnDemandConcurrencyCapAttributes, diff --git a/src/datadog_api_client/v2/model/deleted_suite_response_data.py b/src/datadog_api_client/v2/model/deleted_suite_response_data.py new file mode 100644 index 0000000000..7862047d05 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suite_response_data.py @@ -0,0 +1,66 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.deleted_suite_response_data_attributes import DeletedSuiteResponseDataAttributes + from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes + + +class DeletedSuiteResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.deleted_suite_response_data_attributes import ( + DeletedSuiteResponseDataAttributes, + ) + from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes + + return { + "attributes": (DeletedSuiteResponseDataAttributes,), + "id": (str,), + "type": (SyntheticsSuiteTypes,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[DeletedSuiteResponseDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[SyntheticsSuiteTypes, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: DeletedSuiteResponseDataAttributes, optional + + :param id: + :type id: str, optional + + :param type: Type for the Synthetics suites responses, ``suites``. + :type type: SyntheticsSuiteTypes, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/deleted_suite_response_data_attributes.py b/src/datadog_api_client/v2/model/deleted_suite_response_data_attributes.py new file mode 100644 index 0000000000..58dc23ac18 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suite_response_data_attributes.py @@ -0,0 +1,43 @@ +# 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 Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeletedSuiteResponseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "deleted_at": (str,), + "public_id": (str,), + } + + attribute_map = { + "deleted_at": "deleted_at", + "public_id": "public_id", + } + + def __init__(self_, deleted_at: Union[str, UnsetType] = unset, public_id: Union[str, UnsetType] = unset, **kwargs): + """ + + + :param deleted_at: Deletion timestamp of the Synthetic suite ID. + :type deleted_at: str, optional + + :param public_id: The Synthetic suite ID deleted. + :type public_id: str, optional + """ + if deleted_at is not unset: + kwargs["deleted_at"] = deleted_at + if public_id is not unset: + kwargs["public_id"] = public_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_delete.py b/src/datadog_api_client/v2/model/deleted_suites_request_delete.py new file mode 100644 index 0000000000..ba79c280d4 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_delete.py @@ -0,0 +1,68 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import ( + DeletedSuitesRequestDeleteAttributes, + ) + from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType + + +class DeletedSuitesRequestDelete(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import ( + DeletedSuitesRequestDeleteAttributes, + ) + from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType + + return { + "attributes": (DeletedSuitesRequestDeleteAttributes,), + "id": (str,), + "type": (DeletedSuitesRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: DeletedSuitesRequestDeleteAttributes, + id: Union[str, UnsetType] = unset, + type: Union[DeletedSuitesRequestType, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: DeletedSuitesRequestDeleteAttributes + + :param id: + :type id: str, optional + + :param type: + :type type: DeletedSuitesRequestType, optional + """ + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) + + self_.attributes = attributes diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_delete_attributes.py b/src/datadog_api_client/v2/model/deleted_suites_request_delete_attributes.py new file mode 100644 index 0000000000..d8b88938ae --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_delete_attributes.py @@ -0,0 +1,43 @@ +# 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 + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeletedSuitesRequestDeleteAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "force_delete_dependencies": (bool,), + "public_ids": ([str],), + } + + attribute_map = { + "force_delete_dependencies": "force_delete_dependencies", + "public_ids": "public_ids", + } + + def __init__(self_, public_ids: List[str], force_delete_dependencies: Union[bool, UnsetType] = unset, **kwargs): + """ + + + :param force_delete_dependencies: + :type force_delete_dependencies: bool, optional + + :param public_ids: + :type public_ids: [str] + """ + if force_delete_dependencies is not unset: + kwargs["force_delete_dependencies"] = force_delete_dependencies + super().__init__(kwargs) + + self_.public_ids = public_ids diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_delete_request.py b/src/datadog_api_client/v2/model/deleted_suites_request_delete_request.py new file mode 100644 index 0000000000..9e8b5c0345 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_delete_request.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.deleted_suites_request_delete import DeletedSuitesRequestDelete + + +class DeletedSuitesRequestDeleteRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete + + return { + "data": (DeletedSuitesRequestDelete,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: DeletedSuitesRequestDelete, **kwargs): + """ + + + :param data: + :type data: DeletedSuitesRequestDelete + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/deleted_suites_request_type.py b/src/datadog_api_client/v2/model/deleted_suites_request_type.py new file mode 100644 index 0000000000..a3aeab6e59 --- /dev/null +++ b/src/datadog_api_client/v2/model/deleted_suites_request_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 DeletedSuitesRequestType(ModelSimple): + """ + + + :param value: If omitted defaults to "delete_suites_request". Must be one of ["delete_suites_request"]. + :type value: str + """ + + allowed_values = { + "delete_suites_request", + } + DELETE_SUITES_REQUEST: ClassVar["DeletedSuitesRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DeletedSuitesRequestType.DELETE_SUITES_REQUEST = DeletedSuitesRequestType("delete_suites_request") diff --git a/src/datadog_api_client/v2/model/dora_list_response.py b/src/datadog_api_client/v2/model/deleted_suites_response.py similarity index 59% rename from src/datadog_api_client/v2/model/dora_list_response.py rename to src/datadog_api_client/v2/model/deleted_suites_response.py index d98199af21..637ebf027d 100644 --- a/src/datadog_api_client/v2/model/dora_list_response.py +++ b/src/datadog_api_client/v2/model/deleted_suites_response.py @@ -14,28 +14,28 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.dora_event import DORAEvent + from datadog_api_client.v2.model.deleted_suite_response_data import DeletedSuiteResponseData -class DORAListResponse(ModelNormal): +class DeletedSuitesResponse(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.dora_event import DORAEvent + from datadog_api_client.v2.model.deleted_suite_response_data import DeletedSuiteResponseData return { - "data": ([DORAEvent],), + "data": ([DeletedSuiteResponseData],), } attribute_map = { "data": "data", } - def __init__(self_, data: Union[List[DORAEvent], UnsetType] = unset, **kwargs): + def __init__(self_, data: Union[List[DeletedSuiteResponseData], UnsetType] = unset, **kwargs): """ - Response for the DORA list endpoints. - :param data: The list of DORA events. - :type data: [DORAEvent], optional + + :param data: + :type data: [DeletedSuiteResponseData], optional """ if data is not unset: kwargs["data"] = data diff --git a/src/datadog_api_client/v2/model/dora_deployment_fetch_response.py b/src/datadog_api_client/v2/model/dora_deployment_fetch_response.py new file mode 100644 index 0000000000..4ebb411025 --- /dev/null +++ b/src/datadog_api_client/v2/model/dora_deployment_fetch_response.py @@ -0,0 +1,42 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dora_deployment_object import DORADeploymentObject + + +class DORADeploymentFetchResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dora_deployment_object import DORADeploymentObject + + return { + "data": (DORADeploymentObject,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[DORADeploymentObject, UnsetType] = unset, **kwargs): + """ + Response for fetching a single deployment event. + + :param data: A DORA deployment event. + :type data: DORADeploymentObject, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dora_deployment_object.py b/src/datadog_api_client/v2/model/dora_deployment_object.py new file mode 100644 index 0000000000..ba8734cf96 --- /dev/null +++ b/src/datadog_api_client/v2/model/dora_deployment_object.py @@ -0,0 +1,64 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dora_deployment_object_attributes import DORADeploymentObjectAttributes + from datadog_api_client.v2.model.dora_deployment_type import DORADeploymentType + + +class DORADeploymentObject(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dora_deployment_object_attributes import DORADeploymentObjectAttributes + from datadog_api_client.v2.model.dora_deployment_type import DORADeploymentType + + return { + "attributes": (DORADeploymentObjectAttributes,), + "id": (str,), + "type": (DORADeploymentType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[DORADeploymentObjectAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[DORADeploymentType, UnsetType] = unset, + **kwargs, + ): + """ + A DORA deployment event. + + :param attributes: The attributes of the deployment event. + :type attributes: DORADeploymentObjectAttributes, optional + + :param id: The ID of the deployment event. + :type id: str, optional + + :param type: JSON:API type for DORA deployment events. + :type type: DORADeploymentType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dora_deployment_object_attributes.py b/src/datadog_api_client/v2/model/dora_deployment_object_attributes.py new file mode 100644 index 0000000000..3fa4b7eb07 --- /dev/null +++ b/src/datadog_api_client/v2/model/dora_deployment_object_attributes.py @@ -0,0 +1,101 @@ +# 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.dora_git_info import DORAGitInfo + + +class DORADeploymentObjectAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dora_git_info import DORAGitInfo + + return { + "custom_tags": ([str],), + "env": (str,), + "finished_at": (int,), + "git": (DORAGitInfo,), + "service": (str,), + "started_at": (int,), + "team": (str,), + "version": (str,), + } + + attribute_map = { + "custom_tags": "custom_tags", + "env": "env", + "finished_at": "finished_at", + "git": "git", + "service": "service", + "started_at": "started_at", + "team": "team", + "version": "version", + } + + def __init__( + self_, + finished_at: int, + service: str, + started_at: int, + custom_tags: Union[List[str], none_type, UnsetType] = unset, + env: Union[str, UnsetType] = unset, + git: Union[DORAGitInfo, UnsetType] = unset, + team: Union[str, UnsetType] = unset, + version: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The attributes of the deployment event. + + :param custom_tags: A list of user-defined tags. The tags must follow the ``key:value`` pattern. Up to 100 may be added per event. + :type custom_tags: [str], none_type, optional + + :param env: Environment name to where the service was deployed. + :type env: str, optional + + :param finished_at: Unix timestamp when the deployment finished. + :type finished_at: int + + :param git: Git info for DORA Metrics events. + :type git: DORAGitInfo, optional + + :param service: Service name. + :type service: str + + :param started_at: Unix timestamp when the deployment started. + :type started_at: int + + :param team: Name of the team owning the deployed service. + :type team: str, optional + + :param version: Version to correlate with APM Deployment Tracking. + :type version: str, optional + """ + if custom_tags is not unset: + kwargs["custom_tags"] = custom_tags + if env is not unset: + kwargs["env"] = env + if git is not unset: + kwargs["git"] = git + if team is not unset: + kwargs["team"] = team + if version is not unset: + kwargs["version"] = version + super().__init__(kwargs) + + self_.finished_at = finished_at + self_.service = service + self_.started_at = started_at diff --git a/src/datadog_api_client/v2/model/dora_deployments_list_response.py b/src/datadog_api_client/v2/model/dora_deployments_list_response.py new file mode 100644 index 0000000000..d454fdecd0 --- /dev/null +++ b/src/datadog_api_client/v2/model/dora_deployments_list_response.py @@ -0,0 +1,42 @@ +# 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, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dora_deployment_object import DORADeploymentObject + + +class DORADeploymentsListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dora_deployment_object import DORADeploymentObject + + return { + "data": ([DORADeploymentObject],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[DORADeploymentObject], UnsetType] = unset, **kwargs): + """ + Response for the list deployments endpoint. + + :param data: The list of DORA deployment events. + :type data: [DORADeploymentObject], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dora_event.py b/src/datadog_api_client/v2/model/dora_event.py deleted file mode 100644 index 9f00b76800..0000000000 --- a/src/datadog_api_client/v2/model/dora_event.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class DORAEvent(ModelNormal): - @cached_property - def openapi_types(_): - return { - "attributes": (dict,), - "id": (str,), - "type": (str,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__( - self_, - attributes: Union[dict, UnsetType] = unset, - id: Union[str, UnsetType] = unset, - type: Union[str, UnsetType] = unset, - **kwargs, - ): - """ - A DORA event. - - :param attributes: The attributes of the event. - :type attributes: dict, optional - - :param id: The ID of the event. - :type id: str, optional - - :param type: The type of the event. - :type type: str, optional - """ - if attributes is not unset: - kwargs["attributes"] = attributes - if id is not unset: - kwargs["id"] = id - if type is not unset: - kwargs["type"] = type - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dora_fetch_response.py b/src/datadog_api_client/v2/model/dora_failure_fetch_response.py similarity index 58% rename from src/datadog_api_client/v2/model/dora_fetch_response.py rename to src/datadog_api_client/v2/model/dora_failure_fetch_response.py index a0f42842d7..3d1e5369cd 100644 --- a/src/datadog_api_client/v2/model/dora_fetch_response.py +++ b/src/datadog_api_client/v2/model/dora_failure_fetch_response.py @@ -14,28 +14,28 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.dora_event import DORAEvent + from datadog_api_client.v2.model.dora_incident_object import DORAIncidentObject -class DORAFetchResponse(ModelNormal): +class DORAFailureFetchResponse(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.dora_event import DORAEvent + from datadog_api_client.v2.model.dora_incident_object import DORAIncidentObject return { - "data": (DORAEvent,), + "data": (DORAIncidentObject,), } attribute_map = { "data": "data", } - def __init__(self_, data: Union[DORAEvent, UnsetType] = unset, **kwargs): + def __init__(self_, data: Union[DORAIncidentObject, UnsetType] = unset, **kwargs): """ - Response for the DORA fetch endpoints. + Response for fetching a single failure event. - :param data: A DORA event. - :type data: DORAEvent, optional + :param data: A DORA incident event. + :type data: DORAIncidentObject, optional """ if data is not unset: kwargs["data"] = data diff --git a/src/datadog_api_client/v2/model/dora_failures_list_response.py b/src/datadog_api_client/v2/model/dora_failures_list_response.py new file mode 100644 index 0000000000..2290435b71 --- /dev/null +++ b/src/datadog_api_client/v2/model/dora_failures_list_response.py @@ -0,0 +1,42 @@ +# 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, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dora_incident_object import DORAIncidentObject + + +class DORAFailuresListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dora_incident_object import DORAIncidentObject + + return { + "data": ([DORAIncidentObject],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[DORAIncidentObject], UnsetType] = unset, **kwargs): + """ + Response for the list failures endpoint. + + :param data: The list of DORA incident events. + :type data: [DORAIncidentObject], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dora_incident_object.py b/src/datadog_api_client/v2/model/dora_incident_object.py new file mode 100644 index 0000000000..db99b44d0e --- /dev/null +++ b/src/datadog_api_client/v2/model/dora_incident_object.py @@ -0,0 +1,64 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dora_incident_object_attributes import DORAIncidentObjectAttributes + from datadog_api_client.v2.model.dora_failure_type import DORAFailureType + + +class DORAIncidentObject(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dora_incident_object_attributes import DORAIncidentObjectAttributes + from datadog_api_client.v2.model.dora_failure_type import DORAFailureType + + return { + "attributes": (DORAIncidentObjectAttributes,), + "id": (str,), + "type": (DORAFailureType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[DORAIncidentObjectAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[DORAFailureType, UnsetType] = unset, + **kwargs, + ): + """ + A DORA incident event. + + :param attributes: The attributes of the incident event. + :type attributes: DORAIncidentObjectAttributes, optional + + :param id: The ID of the incident event. + :type id: str, optional + + :param type: JSON:API type for DORA failure events. + :type type: DORAFailureType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dora_incident_object_attributes.py b/src/datadog_api_client/v2/model/dora_incident_object_attributes.py new file mode 100644 index 0000000000..1e302f6f5e --- /dev/null +++ b/src/datadog_api_client/v2/model/dora_incident_object_attributes.py @@ -0,0 +1,119 @@ +# 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.dora_git_info import DORAGitInfo + + +class DORAIncidentObjectAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dora_git_info import DORAGitInfo + + return { + "custom_tags": ([str],), + "env": (str,), + "finished_at": (int,), + "git": (DORAGitInfo,), + "name": (str,), + "services": ([str],), + "severity": (str,), + "started_at": (int,), + "team": (str,), + "version": (str,), + } + + attribute_map = { + "custom_tags": "custom_tags", + "env": "env", + "finished_at": "finished_at", + "git": "git", + "name": "name", + "services": "services", + "severity": "severity", + "started_at": "started_at", + "team": "team", + "version": "version", + } + + def __init__( + self_, + started_at: int, + custom_tags: Union[List[str], none_type, UnsetType] = unset, + env: Union[str, UnsetType] = unset, + finished_at: Union[int, UnsetType] = unset, + git: Union[DORAGitInfo, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + services: Union[List[str], UnsetType] = unset, + severity: Union[str, UnsetType] = unset, + team: Union[str, UnsetType] = unset, + version: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The attributes of the incident event. + + :param custom_tags: A list of user-defined tags. The tags must follow the ``key:value`` pattern. Up to 100 may be added per event. + :type custom_tags: [str], none_type, optional + + :param env: Environment name that was impacted by the incident. + :type env: str, optional + + :param finished_at: Unix timestamp when the incident finished. + :type finished_at: int, optional + + :param git: Git info for DORA Metrics events. + :type git: DORAGitInfo, optional + + :param name: Incident name. + :type name: str, optional + + :param services: Service names impacted by the incident. + :type services: [str], optional + + :param severity: Incident severity. + :type severity: str, optional + + :param started_at: Unix timestamp when the incident started. + :type started_at: int + + :param team: Name of the team owning the services impacted. + :type team: str, optional + + :param version: Version to correlate with APM Deployment Tracking. + :type version: str, optional + """ + if custom_tags is not unset: + kwargs["custom_tags"] = custom_tags + if env is not unset: + kwargs["env"] = env + if finished_at is not unset: + kwargs["finished_at"] = finished_at + if git is not unset: + kwargs["git"] = git + if name is not unset: + kwargs["name"] = name + if services is not unset: + kwargs["services"] = services + if severity is not unset: + kwargs["severity"] = severity + if team is not unset: + kwargs["team"] = team + if version is not unset: + kwargs["version"] = version + super().__init__(kwargs) + + self_.started_at = started_at diff --git a/src/datadog_api_client/v2/model/suite_create_edit.py b/src/datadog_api_client/v2/model/suite_create_edit.py new file mode 100644 index 0000000000..86d2f29a7e --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_create_edit.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes + + +class SuiteCreateEdit(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes + + return { + "attributes": (SyntheticsSuite,), + "type": (SyntheticsSuiteTypes,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: SyntheticsSuite, type: SyntheticsSuiteTypes, **kwargs): + """ + + + :param attributes: Object containing details about a Synthetic suite. + :type attributes: SyntheticsSuite + + :param type: Type for the Synthetics suites responses, ``suites``. + :type type: SyntheticsSuiteTypes + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/suite_create_edit_request.py b/src/datadog_api_client/v2/model/suite_create_edit_request.py new file mode 100644 index 0000000000..8ce9a26d0e --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_create_edit_request.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.suite_create_edit import SuiteCreateEdit + + +class SuiteCreateEditRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit + + return { + "data": (SuiteCreateEdit,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: SuiteCreateEdit, **kwargs): + """ + + + :param data: + :type data: SuiteCreateEdit + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/suite_search_response_type.py b/src/datadog_api_client/v2/model/suite_search_response_type.py new file mode 100644 index 0000000000..fe5cf1443d --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_search_response_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 SuiteSearchResponseType(ModelSimple): + """ + + + :param value: If omitted defaults to "suites_search". Must be one of ["suites_search"]. + :type value: str + """ + + allowed_values = { + "suites_search", + } + SUITES_SEARCH: ClassVar["SuiteSearchResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SuiteSearchResponseType.SUITES_SEARCH = SuiteSearchResponseType("suites_search") diff --git a/src/datadog_api_client/v2/model/synthetics_suite.py b/src/datadog_api_client/v2/model/synthetics_suite.py new file mode 100644 index 0000000000..149061d869 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite.py @@ -0,0 +1,97 @@ +# 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, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions + from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest + from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + + +class SyntheticsSuite(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions + from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest + from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType + + return { + "message": (str,), + "name": (str,), + "options": (SyntheticsSuiteOptions,), + "public_id": (str,), + "tags": ([str],), + "tests": ([SyntheticsSuiteTest],), + "type": (SyntheticsSuiteType,), + } + + attribute_map = { + "message": "message", + "name": "name", + "options": "options", + "public_id": "public_id", + "tags": "tags", + "tests": "tests", + "type": "type", + } + read_only_vars = { + "public_id", + } + + def __init__( + self_, + message: str, + name: str, + options: SyntheticsSuiteOptions, + tests: List[SyntheticsSuiteTest], + type: SyntheticsSuiteType, + public_id: Union[str, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Object containing details about a Synthetic suite. + + :param message: Notification message associated with the suite. + :type message: str + + :param name: Name of the suite. + :type name: str + + :param options: Object describing the extra options for a Synthetic suite. + :type options: SyntheticsSuiteOptions + + :param public_id: The public ID for the test. + :type public_id: str, optional + + :param tags: Array of tags attached to the suite. + :type tags: [str], optional + + :param tests: + :type tests: [SyntheticsSuiteTest] + + :param type: Type of the Synthetic suite, ``suite``. + :type type: SyntheticsSuiteType + """ + if public_id is not unset: + kwargs["public_id"] = public_id + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.message = message + self_.name = name + self_.options = options + self_.tests = tests + self_.type = type diff --git a/src/datadog_api_client/v2/model/synthetics_suite_options.py b/src/datadog_api_client/v2/model/synthetics_suite_options.py new file mode 100644 index 0000000000..b15792e741 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_options.py @@ -0,0 +1,43 @@ +# 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 Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsSuiteOptions(ModelNormal): + validations = { + "alerting_threshold": { + "inclusive_maximum": 1, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "alerting_threshold": (float,), + } + + attribute_map = { + "alerting_threshold": "alerting_threshold", + } + + def __init__(self_, alerting_threshold: Union[float, UnsetType] = unset, **kwargs): + """ + Object describing the extra options for a Synthetic suite. + + :param alerting_threshold: Percentage of critical tests failure needed for a suite to fail. + :type alerting_threshold: float, optional + """ + if alerting_threshold is not unset: + kwargs["alerting_threshold"] = alerting_threshold + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_response.py b/src/datadog_api_client/v2/model/synthetics_suite_response.py new file mode 100644 index 0000000000..548f00063d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_response.py @@ -0,0 +1,42 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_response_data import SyntheticsSuiteResponseData + + +class SyntheticsSuiteResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_response_data import SyntheticsSuiteResponseData + + return { + "data": (SyntheticsSuiteResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[SyntheticsSuiteResponseData, UnsetType] = unset, **kwargs): + """ + Synthetics suite response + + :param data: Synthetics suite response data + :type data: SyntheticsSuiteResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_response_data.py b/src/datadog_api_client/v2/model/synthetics_suite_response_data.py new file mode 100644 index 0000000000..b2454f1cb6 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_response_data.py @@ -0,0 +1,42 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + +class SyntheticsSuiteResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + return { + "attributes": (SyntheticsSuite,), + } + + attribute_map = { + "attributes": "attributes", + } + + def __init__(self_, attributes: Union[SyntheticsSuite, UnsetType] = unset, **kwargs): + """ + Synthetics suite response data + + :param attributes: Object containing details about a Synthetic suite. + :type attributes: SyntheticsSuite, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_search_response.py b/src/datadog_api_client/v2/model/synthetics_suite_search_response.py new file mode 100644 index 0000000000..67340a1f80 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_search_response.py @@ -0,0 +1,42 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_search_response_data import SyntheticsSuiteSearchResponseData + + +class SyntheticsSuiteSearchResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_search_response_data import SyntheticsSuiteSearchResponseData + + return { + "data": (SyntheticsSuiteSearchResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[SyntheticsSuiteSearchResponseData, UnsetType] = unset, **kwargs): + """ + Synthetics suite search response + + :param data: Synthetics suite search response data + :type data: SyntheticsSuiteSearchResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_search_response_data.py b/src/datadog_api_client/v2/model/synthetics_suite_search_response_data.py new file mode 100644 index 0000000000..ef55ea9895 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_search_response_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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes import ( + SyntheticsSuiteSearchResponseDataAttributes, + ) + from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType + + +class SyntheticsSuiteSearchResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes import ( + SyntheticsSuiteSearchResponseDataAttributes, + ) + from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType + + return { + "attributes": (SyntheticsSuiteSearchResponseDataAttributes,), + "id": (UUID,), + "type": (SuiteSearchResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsSuiteSearchResponseDataAttributes, UnsetType] = unset, + id: Union[UUID, UnsetType] = unset, + type: Union[SuiteSearchResponseType, UnsetType] = unset, + **kwargs, + ): + """ + Synthetics suite search response data + + :param attributes: Synthetics suite search response data attributes + :type attributes: SyntheticsSuiteSearchResponseDataAttributes, optional + + :param id: + :type id: UUID, optional + + :param type: + :type type: SuiteSearchResponseType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_search_response_data_attributes.py b/src/datadog_api_client/v2/model/synthetics_suite_search_response_data_attributes.py new file mode 100644 index 0000000000..1497b85adb --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_search_response_data_attributes.py @@ -0,0 +1,57 @@ +# 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, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + +class SyntheticsSuiteSearchResponseDataAttributes(ModelNormal): + validations = { + "total": { + "inclusive_maximum": 2147483647, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite + + return { + "suites": ([SyntheticsSuite],), + "total": (int,), + } + + attribute_map = { + "suites": "suites", + "total": "total", + } + + def __init__( + self_, suites: Union[List[SyntheticsSuite], UnsetType] = unset, total: Union[int, UnsetType] = unset, **kwargs + ): + """ + Synthetics suite search response data attributes + + :param suites: + :type suites: [SyntheticsSuite], optional + + :param total: + :type total: int, optional + """ + if suites is not unset: + kwargs["suites"] = suites + if total is not unset: + kwargs["total"] = total + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_suite_test.py b/src/datadog_api_client/v2/model/synthetics_suite_test.py new file mode 100644 index 0000000000..aea30d1179 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_test.py @@ -0,0 +1,58 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, + ) + + +class SyntheticsSuiteTest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, + ) + + return { + "alerting_criticality": (SyntheticsSuiteTestAlertingCriticality,), + "public_id": (str,), + } + + attribute_map = { + "alerting_criticality": "alerting_criticality", + "public_id": "public_id", + } + + def __init__( + self_, + public_id: str, + alerting_criticality: Union[SyntheticsSuiteTestAlertingCriticality, UnsetType] = unset, + **kwargs, + ): + """ + Object containing details about a Synthetic test included in a Synthetic suite. + + :param alerting_criticality: Alerting criticality for each the test. + :type alerting_criticality: SyntheticsSuiteTestAlertingCriticality, optional + + :param public_id: + :type public_id: str + """ + if alerting_criticality is not unset: + kwargs["alerting_criticality"] = alerting_criticality + super().__init__(kwargs) + + self_.public_id = public_id diff --git a/src/datadog_api_client/v2/model/synthetics_suite_test_alerting_criticality.py b/src/datadog_api_client/v2/model/synthetics_suite_test_alerting_criticality.py new file mode 100644 index 0000000000..5bf3ac8f2e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_test_alerting_criticality.py @@ -0,0 +1,38 @@ +# 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 SyntheticsSuiteTestAlertingCriticality(ModelSimple): + """ + Alerting criticality for each the test. + + :param value: Must be one of ["ignore", "critical"]. + :type value: str + """ + + allowed_values = { + "ignore", + "critical", + } + IGNORE: ClassVar["SyntheticsSuiteTestAlertingCriticality"] + CRITICAL: ClassVar["SyntheticsSuiteTestAlertingCriticality"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsSuiteTestAlertingCriticality.IGNORE = SyntheticsSuiteTestAlertingCriticality("ignore") +SyntheticsSuiteTestAlertingCriticality.CRITICAL = SyntheticsSuiteTestAlertingCriticality("critical") diff --git a/src/datadog_api_client/v2/model/synthetics_suite_type.py b/src/datadog_api_client/v2/model/synthetics_suite_type.py new file mode 100644 index 0000000000..7fa6111014 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_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 SyntheticsSuiteType(ModelSimple): + """ + Type of the Synthetic suite, `suite`. + + :param value: If omitted defaults to "suite". Must be one of ["suite"]. + :type value: str + """ + + allowed_values = { + "suite", + } + SUITE: ClassVar["SyntheticsSuiteType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsSuiteType.SUITE = SyntheticsSuiteType("suite") diff --git a/src/datadog_api_client/v2/model/synthetics_suite_types.py b/src/datadog_api_client/v2/model/synthetics_suite_types.py new file mode 100644 index 0000000000..10072ed8f4 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_suite_types.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 SyntheticsSuiteTypes(ModelSimple): + """ + Type for the Synthetics suites responses, `suites`. + + :param value: If omitted defaults to "suites". Must be one of ["suites"]. + :type value: str + """ + + allowed_values = { + "suites", + } + SUITES: ClassVar["SyntheticsSuiteTypes"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsSuiteTypes.SUITES = SyntheticsSuiteTypes("suites") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 39ee6ab446..5a96a7513e 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1305,21 +1305,27 @@ from datadog_api_client.v2.model.custom_framework_requirement import CustomFrameworkRequirement from datadog_api_client.v2.model.custom_framework_type import CustomFrameworkType from datadog_api_client.v2.model.custom_framework_without_requirements import CustomFrameworkWithoutRequirements +from datadog_api_client.v2.model.dora_deployment_fetch_response import DORADeploymentFetchResponse +from datadog_api_client.v2.model.dora_deployment_object import DORADeploymentObject +from datadog_api_client.v2.model.dora_deployment_object_attributes import DORADeploymentObjectAttributes from datadog_api_client.v2.model.dora_deployment_request import DORADeploymentRequest from datadog_api_client.v2.model.dora_deployment_request_attributes import DORADeploymentRequestAttributes from datadog_api_client.v2.model.dora_deployment_request_data import DORADeploymentRequestData from datadog_api_client.v2.model.dora_deployment_response import DORADeploymentResponse from datadog_api_client.v2.model.dora_deployment_response_data import DORADeploymentResponseData from datadog_api_client.v2.model.dora_deployment_type import DORADeploymentType -from datadog_api_client.v2.model.dora_event import DORAEvent +from datadog_api_client.v2.model.dora_deployments_list_response import DORADeploymentsListResponse +from datadog_api_client.v2.model.dora_failure_fetch_response import DORAFailureFetchResponse from datadog_api_client.v2.model.dora_failure_request import DORAFailureRequest from datadog_api_client.v2.model.dora_failure_request_attributes import DORAFailureRequestAttributes from datadog_api_client.v2.model.dora_failure_request_data import DORAFailureRequestData from datadog_api_client.v2.model.dora_failure_response import DORAFailureResponse from datadog_api_client.v2.model.dora_failure_response_data import DORAFailureResponseData from datadog_api_client.v2.model.dora_failure_type import DORAFailureType -from datadog_api_client.v2.model.dora_fetch_response import DORAFetchResponse +from datadog_api_client.v2.model.dora_failures_list_response import DORAFailuresListResponse from datadog_api_client.v2.model.dora_git_info import DORAGitInfo +from datadog_api_client.v2.model.dora_incident_object import DORAIncidentObject +from datadog_api_client.v2.model.dora_incident_object_attributes import DORAIncidentObjectAttributes from datadog_api_client.v2.model.dora_list_deployments_request import DORAListDeploymentsRequest from datadog_api_client.v2.model.dora_list_deployments_request_attributes import DORAListDeploymentsRequestAttributes from datadog_api_client.v2.model.dora_list_deployments_request_data import DORAListDeploymentsRequestData @@ -1328,7 +1334,6 @@ from datadog_api_client.v2.model.dora_list_failures_request_attributes import DORAListFailuresRequestAttributes from datadog_api_client.v2.model.dora_list_failures_request_data import DORAListFailuresRequestData from datadog_api_client.v2.model.dora_list_failures_request_data_type import DORAListFailuresRequestDataType -from datadog_api_client.v2.model.dora_list_response import DORAListResponse from datadog_api_client.v2.model.dashboard_list_add_items_request import DashboardListAddItemsRequest from datadog_api_client.v2.model.dashboard_list_add_items_response import DashboardListAddItemsResponse from datadog_api_client.v2.model.dashboard_list_delete_items_request import DashboardListDeleteItemsRequest @@ -1395,6 +1400,13 @@ from datadog_api_client.v2.model.delete_apps_response import DeleteAppsResponse from datadog_api_client.v2.model.delete_apps_response_data_items import DeleteAppsResponseDataItems from datadog_api_client.v2.model.delete_custom_framework_response import DeleteCustomFrameworkResponse +from datadog_api_client.v2.model.deleted_suite_response_data import DeletedSuiteResponseData +from datadog_api_client.v2.model.deleted_suite_response_data_attributes import DeletedSuiteResponseDataAttributes +from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete +from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import DeletedSuitesRequestDeleteAttributes +from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest +from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType +from datadog_api_client.v2.model.deleted_suites_response import DeletedSuitesResponse from datadog_api_client.v2.model.dependency_location import DependencyLocation from datadog_api_client.v2.model.deployment import Deployment from datadog_api_client.v2.model.deployment_attributes import DeploymentAttributes @@ -4715,8 +4727,26 @@ from datadog_api_client.v2.model.step import Step from datadog_api_client.v2.model.step_display import StepDisplay from datadog_api_client.v2.model.step_display_bounds import StepDisplayBounds +from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit +from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType from datadog_api_client.v2.model.suppression_version_history import SuppressionVersionHistory from datadog_api_client.v2.model.suppression_versions import SuppressionVersions +from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite +from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions +from datadog_api_client.v2.model.synthetics_suite_response import SyntheticsSuiteResponse +from datadog_api_client.v2.model.synthetics_suite_response_data import SyntheticsSuiteResponseData +from datadog_api_client.v2.model.synthetics_suite_search_response import SyntheticsSuiteSearchResponse +from datadog_api_client.v2.model.synthetics_suite_search_response_data import SyntheticsSuiteSearchResponseData +from datadog_api_client.v2.model.synthetics_suite_search_response_data_attributes import ( + SyntheticsSuiteSearchResponseDataAttributes, +) +from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest +from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import ( + SyntheticsSuiteTestAlertingCriticality, +) +from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType +from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes from datadog_api_client.v2.model.table_result_v2 import TableResultV2 from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array from datadog_api_client.v2.model.table_result_v2_data import TableResultV2Data @@ -6095,21 +6125,27 @@ "CustomFrameworkRequirement", "CustomFrameworkType", "CustomFrameworkWithoutRequirements", + "DORADeploymentFetchResponse", + "DORADeploymentObject", + "DORADeploymentObjectAttributes", "DORADeploymentRequest", "DORADeploymentRequestAttributes", "DORADeploymentRequestData", "DORADeploymentResponse", "DORADeploymentResponseData", "DORADeploymentType", - "DORAEvent", + "DORADeploymentsListResponse", + "DORAFailureFetchResponse", "DORAFailureRequest", "DORAFailureRequestAttributes", "DORAFailureRequestData", "DORAFailureResponse", "DORAFailureResponseData", "DORAFailureType", - "DORAFetchResponse", + "DORAFailuresListResponse", "DORAGitInfo", + "DORAIncidentObject", + "DORAIncidentObjectAttributes", "DORAListDeploymentsRequest", "DORAListDeploymentsRequestAttributes", "DORAListDeploymentsRequestData", @@ -6118,7 +6154,6 @@ "DORAListFailuresRequestAttributes", "DORAListFailuresRequestData", "DORAListFailuresRequestDataType", - "DORAListResponse", "DashboardListAddItemsRequest", "DashboardListAddItemsResponse", "DashboardListDeleteItemsRequest", @@ -6183,6 +6218,13 @@ "DeleteAppsResponse", "DeleteAppsResponseDataItems", "DeleteCustomFrameworkResponse", + "DeletedSuiteResponseData", + "DeletedSuiteResponseDataAttributes", + "DeletedSuitesRequestDelete", + "DeletedSuitesRequestDeleteAttributes", + "DeletedSuitesRequestDeleteRequest", + "DeletedSuitesRequestType", + "DeletedSuitesResponse", "DependencyLocation", "Deployment", "DeploymentAttributes", @@ -8553,8 +8595,22 @@ "Step", "StepDisplay", "StepDisplayBounds", + "SuiteCreateEdit", + "SuiteCreateEditRequest", + "SuiteSearchResponseType", "SuppressionVersionHistory", "SuppressionVersions", + "SyntheticsSuite", + "SyntheticsSuiteOptions", + "SyntheticsSuiteResponse", + "SyntheticsSuiteResponseData", + "SyntheticsSuiteSearchResponse", + "SyntheticsSuiteSearchResponseData", + "SyntheticsSuiteSearchResponseDataAttributes", + "SyntheticsSuiteTest", + "SyntheticsSuiteTestAlertingCriticality", + "SyntheticsSuiteType", + "SyntheticsSuiteTypes", "TableResultV2", "TableResultV2Array", "TableResultV2Data", diff --git a/tests/v2/features/synthetics.feature b/tests/v2/features/synthetics.feature index 73efa73ec2..9f30830eb2 100644 --- a/tests/v2/features/synthetics.feature +++ b/tests/v2/features/synthetics.feature @@ -27,3 +27,73 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK And the response "data.attributes.on_demand_concurrency_cap" is equal to 20 + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "API error response." response + Given new "SearchSuites" request + When the request is sent + Then the response status is 400 API error response. + + @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "OK" response + Given new "SearchSuites" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "API error response." response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "OK" response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "API error response." response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 400 API error response. + + @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "OK" response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "API error response." response + Given new "GetSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "OK" response + Given new "GetSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: edit a test suite returns "API error response." response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: edit a test suite returns "OK" response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + 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 eb43f26dbe..2db822fc92 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4522,6 +4522,43 @@ "type": "safe" } }, + "CreateSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "operationId": "DeleteSyntheticsSuites", + "parameters": [ + { + "name": "body", + "template": "{\"data\": {\"type\": \"delete_suites_request\", \"attributes\": {\"public_ids\": [\"{{ data.attributes.public_id }}\"]}}" + } + ], + "type": "unsafe" + } + }, + "DeleteSyntheticsSuites": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, + "SearchSuites": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "EditSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, "ListTagPipelinesRulesets": { "tag": "Cloud Cost Management", "undo": {