diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 128bce58baa..d17172d5b95 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1265,6 +1265,394 @@ components: $ref: '#/components/schemas/JSONAPIErrorResponse' description: The server cannot process the request because it contains invalid data. + WebIntegrationAccountSchemaBadRequestResponse: + content: + application/json: + examples: + invalid_integration_name: + summary: Invalid integration name format + value: + errors: + - detail: Invalid integration name format + status: '400' + title: Bad Request + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Bad Request: The integration name format is invalid.' + WebIntegrationAccountSchemaForbiddenResponse: + content: + application/json: + examples: + integration_not_allowed: + summary: Integration not allowed + value: + errors: + - detail: The API is currently disabled for this integration + status: '403' + title: Integration Not Allowed + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Forbidden: The integration is not enabled for API access.' + WebIntegrationAccountSchemaNotFoundResponse: + content: + application/json: + examples: + schema_not_found: + summary: Schema not found for integration + value: + errors: + - detail: 'Schema not found for integration: twilio' + status: '404' + title: Not Found + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Not Found: The integration does not exist or has no schema available.' + WebIntegrationAccountSchemaTooManyRequestsResponse: + content: + application/json: + examples: + rate_limit_exceeded: + summary: Rate limit exceeded + value: + errors: + - detail: Rate limit exceeded. Please retry after the rate limit window + expires. + status: '429' + title: Too Many Requests + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Too Many Requests: Rate limit exceeded. + + This endpoint has a rate limit of 12000 requests per organization every 60 + seconds.' + WebIntegrationCreateAccountBadRequestResponse: + content: + application/json: + examples: + invalid_request: + summary: Invalid request body + value: + errors: + - detail: 'Invalid request body: missing required field ''name''' + status: '400' + title: Bad Request + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Bad Request: The request body is malformed or the integration + name format is invalid.' + WebIntegrationCreateAccountForbiddenResponse: + content: + application/json: + examples: + permission_denied: + summary: Permission denied + value: + errors: + - detail: User does not have permission to manage integrations + status: '403' + title: Forbidden + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Forbidden: The integration is not enabled for API access or the + user lacks permissions to manage integrations.' + WebIntegrationCreateAccountNotFoundResponse: + content: + application/json: + examples: + integration_not_found: + summary: Integration not found + value: + errors: + - detail: 'Integration not found: unknown_integration' + status: '404' + title: Not Found + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Not Found: The integration does not exist.' + WebIntegrationCreateAccountTooManyRequestsResponse: + content: + application/json: + examples: + rate_limit_exceeded: + summary: Rate limit exceeded + value: + errors: + - detail: Rate limit exceeded. Please retry after 20 seconds. + status: '429' + title: Too Many Requests + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Too Many Requests: Rate limit exceeded. + + This endpoint has a rate limit of 50 requests per user every 20 seconds.' + WebIntegrationCreateAccountUnprocessableEntityResponse: + content: + application/json: + examples: + validation_failed: + summary: Validation failed + value: + errors: + - detail: settings.account_sid is required + status: '422' + title: Unprocessable Entity + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Unprocessable Entity: The account configuration does not match + the integration schema.' + WebIntegrationDeleteAccountBadRequestResponse: + content: + application/json: + examples: + invalid_account_id: + summary: Invalid account ID format + value: + errors: + - detail: Invalid account ID format + status: '400' + title: Bad Request + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Bad Request: The integration name or account ID format is invalid.' + WebIntegrationDeleteAccountForbiddenResponse: + content: + application/json: + examples: + permission_denied: + summary: Permission denied + value: + errors: + - detail: User does not have permission to delete this account + status: '403' + title: Forbidden + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Forbidden: The integration is not enabled for API access or the + user lacks permissions to manage this account.' + WebIntegrationDeleteAccountNotFoundResponse: + content: + application/json: + examples: + account_not_found: + summary: Account not found + value: + errors: + - detail: 'Account not found: abc123def456' + status: '404' + title: Not Found + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Not Found: The integration or account does not exist.' + WebIntegrationDeleteAccountTooManyRequestsResponse: + content: + application/json: + examples: + rate_limit_exceeded: + summary: Rate limit exceeded + value: + errors: + - detail: Rate limit exceeded. Please retry after 20 seconds. + status: '429' + title: Too Many Requests + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Too Many Requests: Rate limit exceeded. + + This endpoint has a rate limit of 50 requests per user every 20 seconds.' + WebIntegrationGetAccountBadRequestResponse: + content: + application/json: + examples: + invalid_account_id: + summary: Invalid account ID format + value: + errors: + - detail: Invalid account ID format + status: '400' + title: Bad Request + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Bad Request: The integration name or account ID format is invalid.' + WebIntegrationGetAccountForbiddenResponse: + content: + application/json: + examples: + permission_denied: + summary: Permission denied + value: + errors: + - detail: User does not have permission to access this account + status: '403' + title: Forbidden + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Forbidden: The integration is not enabled for API access or the + user lacks required permissions.' + WebIntegrationGetAccountNotFoundResponse: + content: + application/json: + examples: + account_not_found: + summary: Account not found + value: + errors: + - detail: 'Account not found: abc123def456' + status: '404' + title: Not Found + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Not Found: The integration or account does not exist.' + WebIntegrationGetAccountTooManyRequestsResponse: + content: + application/json: + examples: + rate_limit_exceeded: + summary: Rate limit exceeded + value: + errors: + - detail: Rate limit exceeded. Please retry after 60 seconds. + status: '429' + title: Too Many Requests + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Too Many Requests: Rate limit exceeded. + + This endpoint has a rate limit of 12000 requests per organization every 60 + seconds.' + WebIntegrationListAccountsBadRequestResponse: + content: + application/json: + examples: + invalid_integration_name: + summary: Invalid integration name format + value: + errors: + - detail: Invalid integration name format + status: '400' + title: Bad Request + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Bad Request: The integration name format is invalid.' + WebIntegrationListAccountsForbiddenResponse: + content: + application/json: + examples: + integration_not_allowed: + summary: Integration not allowed + value: + errors: + - detail: The API is currently disabled for this integration + status: '403' + title: Forbidden + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Forbidden: The integration is not enabled for API access or the + user lacks required permissions.' + WebIntegrationListAccountsNotFoundResponse: + content: + application/json: + examples: + integration_not_found: + summary: Integration not found + value: + errors: + - detail: 'Integration not found: unknown_integration' + status: '404' + title: Not Found + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Not Found: The integration does not exist.' + WebIntegrationListAccountsTooManyRequestsResponse: + content: + application/json: + examples: + rate_limit_exceeded: + summary: Rate limit exceeded + value: + errors: + - detail: Rate limit exceeded. Please retry after 20 seconds. + status: '429' + title: Too Many Requests + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Too Many Requests: Rate limit exceeded. + + This endpoint has a rate limit of 50 requests per user every 20 seconds.' + WebIntegrationUpdateAccountBadRequestResponse: + content: + application/json: + examples: + invalid_request: + summary: Invalid request body + value: + errors: + - detail: Invalid request body format + status: '400' + title: Bad Request + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Bad Request: The request body is malformed or the integration + name/account ID format is invalid.' + WebIntegrationUpdateAccountForbiddenResponse: + content: + application/json: + examples: + permission_denied: + summary: Permission denied + value: + errors: + - detail: User does not have permission to update this account + status: '403' + title: Forbidden + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Forbidden: The integration is not enabled for API access or the + user lacks permissions to manage this account.' + WebIntegrationUpdateAccountNotFoundResponse: + content: + application/json: + examples: + account_not_found: + summary: Account not found + value: + errors: + - detail: 'Account not found: abc123def456' + status: '404' + title: Not Found + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Not Found: The integration or account does not exist.' + WebIntegrationUpdateAccountTooManyRequestsResponse: + content: + application/json: + examples: + rate_limit_exceeded: + summary: Rate limit exceeded + value: + errors: + - detail: Rate limit exceeded. Please retry after 20 seconds. + status: '429' + title: Too Many Requests + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Too Many Requests: Rate limit exceeded. + + This endpoint has a rate limit of 50 requests per user every 20 seconds.' + WebIntegrationUpdateAccountUnprocessableEntityResponse: + content: + application/json: + examples: + validation_failed: + summary: Validation failed + value: + errors: + - detail: settings.api_key must be at least 32 characters + status: '422' + title: Unprocessable Entity + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: 'Unprocessable Entity: The account configuration does not match + the integration schema.' schemas: APIErrorResponse: description: API error response. @@ -49256,18 +49644,6 @@ components: meta: $ref: '#/components/schemas/ResponseMetaAttributes' type: object - SecurityMonitoringPaginatedSuppressionsResponse: - description: Response object containing the available suppression rules with - pagination metadata. - properties: - data: - description: A list of suppressions objects. - items: - $ref: '#/components/schemas/SecurityMonitoringSuppression' - type: array - meta: - $ref: '#/components/schemas/SecurityMonitoringSuppressionsMeta' - type: object SecurityMonitoringReferenceTable: description: Reference tables used in the queries. properties: @@ -51417,31 +51793,6 @@ components: data: $ref: '#/components/schemas/SecurityMonitoringSuppression' type: object - SecurityMonitoringSuppressionSort: - description: The sort parameters used for querying suppression rules. - enum: - - name - - start_date - - expiration_date - - update_date - - enabled - - -name - - -start_date - - -expiration_date - - -update_date - - -enabled - type: string - x-enum-varnames: - - NAME - - START_DATE - - EXPIRATION_DATE - - UPDATE_DATE - - ENABLED - - NAME_DESCENDING - - START_DATE_DESCENDING - - EXPIRATION_DATE_DESCENDING - - UPDATE_DATE_DESCENDING - - ENABLED_DESCENDING SecurityMonitoringSuppressionType: default: suppressions description: The type of the resource. The value should always be `suppressions`. @@ -51537,31 +51888,6 @@ components: required: - data type: object - SecurityMonitoringSuppressionsMeta: - description: Metadata for the suppression list response. - properties: - page: - $ref: '#/components/schemas/SecurityMonitoringSuppressionsPageMeta' - type: object - SecurityMonitoringSuppressionsPageMeta: - description: Pagination metadata. - properties: - pageNumber: - description: Current page number. - example: 0 - format: int64 - type: integer - pageSize: - description: Current page size. - example: 2 - format: int64 - type: integer - totalCount: - description: Total count of suppressions. - example: 2 - format: int64 - type: integer - type: object SecurityMonitoringSuppressionsResponse: description: Response object containing the available suppression rules. properties: @@ -60498,6 +60824,412 @@ components: - X_CONTENT_TYPE_HEADER_MISSING - X_PATH_INJECTION - XSS + WebIntegrationAccountAttributes: + description: Attributes for a web integration account. + properties: + name: + description: The name of the account. + example: My Production Account + type: string + settings: + additionalProperties: {} + description: 'Integration-specific settings for the account. The structure + and required fields vary by integration type. + + Use the schema endpoint to retrieve the specific requirements for each + integration.' + example: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + alerts: false + api_key: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + call_summaries: true + ccm_enabled: true + censor_logs: true + events: true + messages: true + type: object + required: + - name + - settings + type: object + WebIntegrationAccountCreateRequest: + description: Payload for creating a web integration account. + properties: + data: + $ref: '#/components/schemas/WebIntegrationAccountCreateRequestData' + required: + - data + type: object + WebIntegrationAccountCreateRequestAttributes: + description: Attributes for creating a web integration account. + properties: + name: + description: The name of the account. + example: My Production Account + type: string + secrets: + additionalProperties: {} + description: 'Sensitive credentials for the account. The structure and required + fields vary by integration type. + + These values are write-only and never returned in responses. Use the schema + endpoint to determine + + which secret fields are required for your specific integration.' + example: + api_key_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: object + settings: + additionalProperties: {} + description: 'Integration-specific settings for the account. The structure + and required fields vary by integration type. + + Use the schema endpoint (GET /api/v2/web-integrations/{integration_name}/accounts/schema) + to retrieve + + the specific requirements for your integration before creating an account.' + example: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + alerts: true + api_key: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + call_summaries: true + ccm_enabled: true + censor_logs: true + events: true + messages: true + type: object + required: + - name + - settings + - secrets + type: object + WebIntegrationAccountCreateRequestData: + description: Data object for creating a web integration account. + properties: + attributes: + $ref: '#/components/schemas/WebIntegrationAccountCreateRequestAttributes' + type: + $ref: '#/components/schemas/WebIntegrationAccountType' + required: + - type + - attributes + type: object + WebIntegrationAccountResponse: + description: Response containing a single web integration account. + properties: + data: + $ref: '#/components/schemas/WebIntegrationAccountResponseData' + integration_name: + description: The name of the integration. + example: twilio + type: string + type: object + WebIntegrationAccountResponseData: + description: Data object for a web integration account response. + properties: + attributes: + $ref: '#/components/schemas/WebIntegrationAccountAttributes' + id: + description: The unique identifier for the account. + example: abc123def456 + type: string + type: + $ref: '#/components/schemas/WebIntegrationAccountType' + required: + - id + - type + - attributes + type: object + WebIntegrationAccountSchemaResponse: + description: 'Response containing the JSON schema for an integration''s account + configuration. + + This schema defines the required and optional fields for both settings and + secrets, + + including field types, validation rules, and descriptions. + + + The response is a standard [JSON Schema (draft-07)](https://json-schema.org/draft-07/schema#) + document describing the account + + configuration structure. Since this is a dynamic JSON Schema, the exact properties + + will vary by integration.' + example: + $schema: http://json-schema.org/draft-07/schema# + properties: + secrets: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponseExampleSecrets' + settings: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponseExampleSettings' + required: + - settings + - secrets + type: object + properties: + $schema: + description: The JSON Schema version URI. + example: http://json-schema.org/draft-07/schema# + type: string + additionalProperties: + description: Whether additional properties are allowed at the root level + (typically false). + example: false + type: boolean + properties: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponseProperties' + required: + description: List of required top-level properties. + example: + - settings + - secrets + items: + type: string + type: array + type: + description: The root type of the schema (always "object"). + example: object + type: string + required: + - $schema + - type + - properties + - required + type: object + WebIntegrationAccountSchemaResponseExampleSecrets: + additionalProperties: false + properties: + api_key_token: + description: Twilio API Key Secret (token) corresponding to the API Key + SID. Keep this secure as it provides authentication access. + example: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + minLength: 1 + type: string + required: + - api_key_token + type: object + WebIntegrationAccountSchemaResponseExampleSettings: + additionalProperties: false + properties: + account_sid: + description: Twilio Account SID that uniquely identifies your Twilio account. + Found in Twilio Console > Account Info. + example: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + minLength: 1 + type: string + alerts: + default: false + description: Enable collection of Twilio Alerts logs to monitor account + alerts and notifications. + type: boolean + api_key: + description: Twilio API Key SID for authentication. Create from Twilio Console + > Account > API Keys & Tokens. + example: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + minLength: 1 + type: string + call_summaries: + default: false + description: Enable collection of Twilio Voice call summaries to track voice + call performance and metadata. + type: boolean + ccm_enabled: + default: false + description: Enable Cloud Cost Management to monitor Twilio usage costs + and identify optimization opportunities. + type: boolean + censor_logs: + default: false + description: Enable censoring of sensitive data in logs. When true, phone + numbers and SMS message bodies are censored for privacy. + type: boolean + events: + default: false + description: Enable collection of Twilio Events logs to monitor account-level + events and activities. + type: boolean + messages: + default: false + description: Enable collection of Twilio Messages logs to track SMS and + messaging activity. + type: boolean + required: + - api_key + - account_sid + type: object + WebIntegrationAccountSchemaResponseProperties: + description: 'The properties object containing settings and secrets schema definitions. + + Both are always present in every integration schema.' + properties: + secrets: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponseSecretsObject' + settings: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponseSettingsObject' + required: + - settings + - secrets + type: object + WebIntegrationAccountSchemaResponseSecretsObject: + description: 'JSON Schema definition for the secrets object. + + Contains sensitive credentials required for the integration such as API keys, + + tokens, and passwords. These values are write-only and never returned in responses.' + properties: + additionalProperties: + description: Whether additional properties are allowed (typically false). + example: false + type: boolean + properties: + additionalProperties: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponseSettingsField' + description: 'The individual secret fields for this integration. + + Field names and types vary by integration.' + type: object + required: + description: List of required secret field names. + items: + type: string + type: array + type: + description: Always "object" for the secrets container. + example: object + type: string + type: object + WebIntegrationAccountSchemaResponseSettingsField: + description: 'JSON Schema definition for a single field within settings or secrets. + + The exact fields vary by integration.' + properties: + additionalProperties: + description: Whether additional properties are allowed for this field. + example: false + type: boolean + default: + description: Default value for the field if not provided. + description: + description: Human-readable description of the field's purpose. + example: API key for authentication + type: string + items: + description: Schema for array items when type is "array". + type: object + minLength: + description: Minimum length for string fields. + example: 1 + format: int64 + type: integer + type: + description: The data type of the field (string, boolean, integer, array, + object). + example: string + type: string + type: object + WebIntegrationAccountSchemaResponseSettingsObject: + description: 'JSON Schema definition for the settings object. + + Contains integration-specific configuration fields such as account identifiers, + + feature toggles, and non-sensitive configuration options.' + properties: + additionalProperties: + description: Whether additional properties are allowed (typically false). + example: false + type: boolean + properties: + additionalProperties: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponseSettingsField' + description: 'The individual setting fields for this integration. + + Field names and types vary by integration.' + type: object + required: + description: List of required setting field names. + items: + type: string + type: array + type: + description: Always "object" for the settings container. + example: object + type: string + type: object + WebIntegrationAccountType: + default: Account + description: The JSON:API type for web integration accounts. + enum: + - Account + example: Account + type: string + x-enum-varnames: + - ACCOUNT + WebIntegrationAccountUpdateRequest: + description: Payload for updating a web integration account. + properties: + data: + $ref: '#/components/schemas/WebIntegrationAccountUpdateRequestData' + required: + - data + type: object + WebIntegrationAccountUpdateRequestAttributes: + description: 'Attributes for updating a web integration account. All fields + are optional - + + only provide the fields you want to update. Partial updates are supported, + + allowing you to modify specific settings or secrets without providing all + fields.' + properties: + name: + description: The name of the account. + example: My Production Account (Updated) + type: string + secrets: + additionalProperties: {} + description: 'Sensitive credentials to update. Only the secrets provided + will be updated. + + These values are write-only and never returned in responses.' + example: + api_key_token: new_secret_token_value + type: object + settings: + additionalProperties: {} + description: 'Integration-specific settings to update. Only the fields provided + will be updated. + + The structure varies by integration type. Refer to the integration''s + schema for available fields.' + example: + ccm_enabled: true + events: true + messages: false + type: object + type: object + WebIntegrationAccountUpdateRequestData: + description: Data object for updating a web integration account. + properties: + attributes: + $ref: '#/components/schemas/WebIntegrationAccountUpdateRequestAttributes' + type: + $ref: '#/components/schemas/WebIntegrationAccountType' + required: + - type + type: object + WebIntegrationAccountsResponse: + description: Response containing a list of web integration accounts. + properties: + data: + items: + $ref: '#/components/schemas/WebIntegrationAccountResponseData' + type: array + integration_name: + description: The name of the integration. + example: twilio + type: string + type: object Weekday: description: A day of the week. enum: @@ -85732,29 +86464,12 @@ paths: required: false schema: type: string - - description: Attribute used to sort the list of suppression rules. Prefix - with `-` to sort in descending order. - in: query - name: sort - required: false - schema: - $ref: '#/components/schemas/SecurityMonitoringSuppressionSort' - - description: Size for a given page. Use `-1` to return all items. - in: query - name: page[size] - required: false - schema: - default: -1 - example: 10 - format: int64 - type: integer - - $ref: '#/components/parameters/PageNumber' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SecurityMonitoringPaginatedSuppressionsResponse' + $ref: '#/components/schemas/SecurityMonitoringSuppressionsResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' @@ -92022,6 +92737,280 @@ paths: operator: OR permissions: - teams_read + /api/v2/web-integrations/{integration_name}/accounts: + get: + description: 'Retrieve all configured accounts for a specific integration within + your organization. + + + Rate limit: 50 requests per user every 20 seconds.' + operationId: ListWebIntegrationAccounts + parameters: + - description: The name of the integration. + example: twilio + in: path + name: integration_name + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebIntegrationAccountsResponse' + description: 'OK: List of all accounts for the specified integration.' + '400': + $ref: '#/components/responses/WebIntegrationListAccountsBadRequestResponse' + '403': + $ref: '#/components/responses/WebIntegrationListAccountsForbiddenResponse' + '404': + $ref: '#/components/responses/WebIntegrationListAccountsNotFoundResponse' + '429': + $ref: '#/components/responses/WebIntegrationListAccountsTooManyRequestsResponse' + summary: List integration accounts + tags: + - Web Integrations + x-permission: + operator: OR + permissions: + - integrations_read + post: + description: 'Create a new account for a specific integration. The account configuration + must conform + + to the schema defined for the integration, which can be retrieved using the + schema endpoint. + + + Rate limit: 50 requests per user every 20 seconds.' + operationId: CreateWebIntegrationAccount + parameters: + - description: The name of the integration. + example: twilio + in: path + name: integration_name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebIntegrationAccountCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebIntegrationAccountResponse' + description: 'Created: The account was successfully created.' + '400': + $ref: '#/components/responses/WebIntegrationCreateAccountBadRequestResponse' + '403': + $ref: '#/components/responses/WebIntegrationCreateAccountForbiddenResponse' + '404': + $ref: '#/components/responses/WebIntegrationCreateAccountNotFoundResponse' + '422': + $ref: '#/components/responses/WebIntegrationCreateAccountUnprocessableEntityResponse' + '429': + $ref: '#/components/responses/WebIntegrationCreateAccountTooManyRequestsResponse' + summary: Create integration account + tags: + - Web Integrations + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - manage_integrations + /api/v2/web-integrations/{integration_name}/accounts/schema: + get: + description: 'Get the JSON schema that defines the structure and validation + rules for account configuration + + of a specific integration. This schema describes the required and optional + fields for both + + settings and secrets when creating or updating an account. + + + Rate limit: 12000 requests per organization every 60 seconds.' + operationId: GetWebIntegrationAccountSchema + parameters: + - description: The name of the integration. + example: twilio + in: path + name: integration_name + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebIntegrationAccountSchemaResponse' + description: 'OK: The JSON schema for the integration''s account configuration.' + '400': + $ref: '#/components/responses/WebIntegrationAccountSchemaBadRequestResponse' + '403': + $ref: '#/components/responses/WebIntegrationAccountSchemaForbiddenResponse' + '404': + $ref: '#/components/responses/WebIntegrationAccountSchemaNotFoundResponse' + '429': + $ref: '#/components/responses/WebIntegrationAccountSchemaTooManyRequestsResponse' + summary: Get account schema for an integration + tags: + - Web Integrations + x-permission: + operator: OR + permissions: + - integrations_read + /api/v2/web-integrations/{integration_name}/accounts/{account_id}: + delete: + description: 'Delete a specific account by its ID for a given integration. This + will remove the + + account configuration and stop any data collection associated with it. + + + Rate limit: 50 requests per user every 20 seconds.' + operationId: DeleteWebIntegrationAccount + parameters: + - description: The name of the integration. + example: twilio + in: path + name: integration_name + required: true + schema: + type: string + - description: The unique identifier of the account. + example: abc123def456 + in: path + name: account_id + required: true + schema: + type: string + responses: + '200': + description: 'OK: The account was successfully deleted.' + '400': + $ref: '#/components/responses/WebIntegrationDeleteAccountBadRequestResponse' + '403': + $ref: '#/components/responses/WebIntegrationDeleteAccountForbiddenResponse' + '404': + $ref: '#/components/responses/WebIntegrationDeleteAccountNotFoundResponse' + '429': + $ref: '#/components/responses/WebIntegrationDeleteAccountTooManyRequestsResponse' + summary: Delete integration account + tags: + - Web Integrations + x-permission: + operator: OR + permissions: + - manage_integrations + get: + description: 'Retrieve a specific account by its ID for a given integration. + The response includes + + the account name and settings, but excludes sensitive secret values. + + + Rate limit: 12000 requests per organization every 60 seconds.' + operationId: GetWebIntegrationAccount + parameters: + - description: The name of the integration. + example: twilio + in: path + name: integration_name + required: true + schema: + type: string + - description: The unique identifier of the account. + example: abc123def456 + in: path + name: account_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebIntegrationAccountResponse' + description: 'OK: The account details for the specified integration.' + '400': + $ref: '#/components/responses/WebIntegrationGetAccountBadRequestResponse' + '403': + $ref: '#/components/responses/WebIntegrationGetAccountForbiddenResponse' + '404': + $ref: '#/components/responses/WebIntegrationGetAccountNotFoundResponse' + '429': + $ref: '#/components/responses/WebIntegrationGetAccountTooManyRequestsResponse' + summary: Get integration account + tags: + - Web Integrations + x-permission: + operator: OR + permissions: + - integrations_read + patch: + description: 'Update an existing account for a specific integration. You can + update the name, settings, + + and/or secrets. Only the fields provided in the request will be updated. + + + Rate limit: 50 requests per user every 20 seconds.' + operationId: UpdateWebIntegrationAccount + parameters: + - description: The name of the integration. + example: twilio + in: path + name: integration_name + required: true + schema: + type: string + - description: The unique identifier of the account. + example: abc123def456 + in: path + name: account_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebIntegrationAccountUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebIntegrationAccountResponse' + description: 'OK: The account was successfully updated.' + '400': + $ref: '#/components/responses/WebIntegrationUpdateAccountBadRequestResponse' + '403': + $ref: '#/components/responses/WebIntegrationUpdateAccountForbiddenResponse' + '404': + $ref: '#/components/responses/WebIntegrationUpdateAccountNotFoundResponse' + '422': + $ref: '#/components/responses/WebIntegrationUpdateAccountUnprocessableEntityResponse' + '429': + $ref: '#/components/responses/WebIntegrationUpdateAccountTooManyRequestsResponse' + summary: Update integration account + tags: + - Web Integrations + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - manage_integrations /api/v2/workflows: post: description: Create a new workflow, returning the workflow ID. This API requires @@ -92981,6 +93970,14 @@ tags: externalDocs: url: https://docs.datadoghq.com/account_management/users name: Users +- description: "Configure and manage third-party web integrations with Datadog. This + API provides a unified\ninterface for managing integration accounts across various + external services.\n\nEach integration has its own unique schema that defines + the required settings and secrets.\nBefore creating or updating an account, use + the schema endpoint to retrieve the specific\nrequirements, field types, validation + rules, and available configuration options for your\nintegration.\n\nSupported + Integrations:\n - twilio\n - snowflake-web\n - databricks" + name: Web Integrations - description: Datadog Workflow Automation allows you to automate your end-to-end processes by connecting Datadog with the rest of your tech stack. Build workflows to auto-remediate your alerts, streamline your incident and security processes, diff --git a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen index ec35b858851..3f3e3c99f21 100644 --- a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:03.168Z \ No newline at end of file +2025-11-07T12:27:26.759Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml index 37f25710f24..e3828707dc7 100644 --- a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:26 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","enabled":true,"name":"suppression - Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","enabled":true,"name":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"itm-ljs-0qw","type":"suppressions","attributes":{"creation_date":1768411744411,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","editable":true,"enabled":true,"name":"suppression - Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744411,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"uea-lab-big","type":"suppressions","attributes":{"creation_date":1762518447002,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","editable":true,"enabled":true,"name":"Test-Delete_a_suppression_rule_returns_OK_response-1762518446","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447002,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,14 +23,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:26 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big response: body: encoding: UTF-8 @@ -41,18 +39,18 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:26 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big response: body: encoding: UTF-8 - string: '{"errors":["not_found(Suppression with ID itm-ljs-0qw not found)"]}' + string: '{"errors":["not_found(Suppression with ID uea-lab-big not found)"]}' headers: Content-Type: - application/json diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen index 16f1a15eddc..a93a4d20e75 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:04.856Z \ No newline at end of file +2025-11-07T12:27:27.654Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml index 6021eaad967..21d50015e7c 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:27 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ylq-igi-icg","type":"suppressions","attributes":{"creation_date":1762518447901,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","editable":true,"enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447901,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,20 +23,19 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:27 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg response: body: encoding: UTF-8 - string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ylq-igi-icg","type":"suppressions","attributes":{"creation_date":1762518447901,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","editable":true,"enabled":true,"name":"Test-Get_a_suppression_rule_returns_OK_response-1762518447","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518447901,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -46,14 +43,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:27 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ylq-igi-icg response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen index 66913264132..d0d5ccec313 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:05.317Z \ No newline at end of file +2025-11-26T13:33:06.482Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml index 26e1a51de10..84c317daea0 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 26 Nov 2025 13:33:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","enabled":true,"name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,45 +14,39 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"sro-unv-k08","type":"suppressions","attributes":{"creation_date":1768411745430,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745430,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"version":1}}}' + string: '{"data":{"id":"456-piv-74h","type":"suppressions","attributes":{"creation_date":1764163986851,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","editable":true,"enabled":true,"name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1764163986851,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 26 Nov 2025 13:33:06 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08/version_history + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/456-piv-74h/version_history response: body: encoding: UTF-8 - string: '{"data":{"id":"sro-unv-k08","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"sro-unv-k08","name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"creation_date":1768411745430,"update_date":1768411745430,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' + string: '{"data":{"id":"456-piv-74h","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"456-piv-74h","name":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1764163986","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"frog@datadoghq.com","name":"frog"},"creation_date":1764163986851,"update_date":1764163986851,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 26 Nov 2025 13:33:06 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08 + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/456-piv-74h response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen deleted file mode 100644 index 23cdf460db7..00000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:28.523Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml deleted file mode 100644 index 5d0f6038306..00000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml +++ /dev/null @@ -1,101 +0,0 @@ -http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"lgh-7no-380","type":"suppressions","attributes":{"creation_date":1768410749324,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410749324,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?page%5Bsize%5D=1&page%5Bnumber%5D=0&query=id%3Afgz-hyr-ibu%20OR%20id%3Algh-7no-380 - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":1,"pageNumber":0}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/lgh-7no-380 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fgz-hyr-ibu - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen deleted file mode 100644 index 89bfc8cd8ef..00000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:30.925Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml deleted file mode 100644 index 0e765861acf..00000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml +++ /dev/null @@ -1,102 +0,0 @@ -http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=name&query=id%3A5cq-vnw-eza%20OR%20id%3Afuu-xxd-kjd - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fuu-xxd-kjd - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/5cq-vnw-eza - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen deleted file mode 100644 index d184a46ea08..00000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-14T17:12:33.088Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml deleted file mode 100644 index 8b1f589c467..00000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml +++ /dev/null @@ -1,102 +0,0 @@ -http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=-name&query=id%3Aosw-qyf-tqn%20OR%20id%3Ape9-gdi-ee2 - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/pe9-gdi-ee2 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/osw-qyf-tqn - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen index e05f55dd710..8839a50677d 100644 --- a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:05.825Z \ No newline at end of file +2025-11-07T12:27:28.613Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml index 55f2cb1ff7b..4fb6f154ade 100644 --- a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,9 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:28 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745950,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"uqt-hh6-qbq","type":"suppressions","attributes":{"creation_date":1762518448839,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","editable":true,"enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518448839,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:28 GMT request: body: encoding: UTF-8 @@ -36,14 +34,13 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq response: body: encoding: UTF-8 - string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:staging - status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411746111,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"uqt-hh6-qbq","type":"suppressions","attributes":{"creation_date":1762518448839,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","editable":true,"enabled":true,"name":"Test-Update_a_suppression_rule_returns_OK_response-1762518448","rule_query":"source:cloudtrail","suppression_query":"env:staging + status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1762518449150,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":2}}}' headers: Content-Type: @@ -51,14 +48,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Fri, 07 Nov 2025 12:27:28 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uqt-hh6-qbq response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/web_integrations/Create-integration-account-returns-Created-response.frozen b/cassettes/features/v2/web_integrations/Create-integration-account-returns-Created-response.frozen new file mode 100644 index 00000000000..ee56d681a17 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Create-integration-account-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-16T00:21:52.989Z \ No newline at end of file diff --git a/cassettes/features/v2/web_integrations/Create-integration-account-returns-Created-response.yml b/cassettes/features/v2/web_integrations/Create-integration-account-returns-Created-response.yml new file mode 100644 index 00000000000..042aefdfea4 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Create-integration-account-returns-Created-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Fri, 16 Jan 2026 00:21:52 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Create_integration_account_returns_Created_response-1768522912","secrets":{"api_key_token":"test_secret_token"},"settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}},"type":"Account"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"591eebe4-998f-49f0-b5db-a6b76e3ff392","type":"Account","attributes":{"name":"Test-Create_integration_account_returns_Created_response-1768522912","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/web_integrations/Delete-integration-account-returns-OK-response.frozen b/cassettes/features/v2/web_integrations/Delete-integration-account-returns-OK-response.frozen new file mode 100644 index 00000000000..54451354153 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Delete-integration-account-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-16T00:21:53.514Z \ No newline at end of file diff --git a/cassettes/features/v2/web_integrations/Delete-integration-account-returns-OK-response.yml b/cassettes/features/v2/web_integrations/Delete-integration-account-returns-OK-response.yml new file mode 100644 index 00000000000..993b963690c --- /dev/null +++ b/cassettes/features/v2/web_integrations/Delete-integration-account-returns-OK-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Fri, 16 Jan 2026 00:21:53 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Delete_integration_account_returns_OK_response-1768522913","secrets":{"api_key_token":"test_secret_token_value"},"settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}},"type":"Account"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2ef78fa1-8ebd-4dc8-8db7-1516563d9a35","type":"Account","attributes":{"name":"Test-Delete_integration_account_returns_OK_response-1768522913","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 16 Jan 2026 00:21:53 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts/2ef78fa1-8ebd-4dc8-8db7-1516563d9a35 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/web_integrations/Get-account-schema-for-an-integration-returns-OK-response.frozen b/cassettes/features/v2/web_integrations/Get-account-schema-for-an-integration-returns-OK-response.frozen new file mode 100644 index 00000000000..5b4b6c40750 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Get-account-schema-for-an-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-16T00:23:39.895Z \ No newline at end of file diff --git a/cassettes/features/v2/web_integrations/Get-account-schema-for-an-integration-returns-OK-response.yml b/cassettes/features/v2/web_integrations/Get-account-schema-for-an-integration-returns-OK-response.yml new file mode 100644 index 00000000000..201c7584b41 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Get-account-schema-for-an-integration-returns-OK-response.yml @@ -0,0 +1,35 @@ +http_interactions: +- recorded_at: Fri, 16 Jan 2026 00:23:39 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts/schema + response: + body: + encoding: UTF-8 + string: '{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"secrets":{"additionalProperties":false,"properties":{"api_key_token":{"additionalProperties":false,"description":"Twilio + API Key Secret (token) corresponding to the API Key SID. Keep this secure + as it provides authentication access.","minLength":1,"type":"string"}},"required":["api_key_token"],"type":"object"},"settings":{"additionalProperties":false,"properties":{"account_sid":{"additionalProperties":false,"description":"Twilio + Account SID that uniquely identifies your Twilio account. Found in Twilio + Console \u003e Account Info.","minLength":1,"type":"string"},"alerts":{"additionalProperties":false,"description":"Enable + collection of Twilio Alerts logs to monitor account alerts and notifications","type":"boolean"},"api_key":{"additionalProperties":false,"description":"Twilio + API Key SID for authentication. Create from Twilio Console \u003e Account + \u003e API Keys \u0026 Tokens.","minLength":1,"type":"string"},"call_summaries":{"additionalProperties":false,"description":"Enable + collection of Twilio Voice call summaries to track voice call performance + and metadata","type":"boolean"},"ccm_enabled":{"additionalProperties":false,"description":"Enable + Cloud Cost Management to monitor Twilio usage costs and identify optimization + opportunities","type":"boolean"},"censor_logs":{"additionalProperties":false,"description":"Enable + censoring of sensitive data in logs. When true, phone numbers in the ''to'' + field and SMS message bodies are censored for privacy.","type":"boolean"},"events":{"additionalProperties":false,"description":"Enable + collection of Twilio Events logs to monitor account-level events and activities","type":"boolean"},"messages":{"additionalProperties":false,"description":"Enable + collection of Twilio Messages logs to track SMS and messaging activity","type":"boolean"}},"required":["api_key","account_sid","events","messages","alerts","call_summaries","ccm_enabled","censor_logs"],"type":"object"}},"required":["settings","secrets"],"type":"object"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/web_integrations/Get-integration-account-returns-OK-response.frozen b/cassettes/features/v2/web_integrations/Get-integration-account-returns-OK-response.frozen new file mode 100644 index 00000000000..67caccae486 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Get-integration-account-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-16T00:21:54.756Z \ No newline at end of file diff --git a/cassettes/features/v2/web_integrations/Get-integration-account-returns-OK-response.yml b/cassettes/features/v2/web_integrations/Get-integration-account-returns-OK-response.yml new file mode 100644 index 00000000000..002d04b0712 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Get-integration-account-returns-OK-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Fri, 16 Jan 2026 00:21:54 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Get_integration_account_returns_OK_response-1768522914","secrets":{"api_key_token":"test_secret_token_value"},"settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}},"type":"Account"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"945d4bbe-d24e-4530-a4db-3dc27329e5e8","type":"Account","attributes":{"name":"Test-Get_integration_account_returns_OK_response-1768522914","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 16 Jan 2026 00:21:54 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts/945d4bbe-d24e-4530-a4db-3dc27329e5e8 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"945d4bbe-d24e-4530-a4db-3dc27329e5e8","type":"Account","attributes":{"name":"Test-Get_integration_account_returns_OK_response-1768522914","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/web_integrations/List-integration-accounts-returns-OK-response.frozen b/cassettes/features/v2/web_integrations/List-integration-accounts-returns-OK-response.frozen new file mode 100644 index 00000000000..3e3e9e31421 --- /dev/null +++ b/cassettes/features/v2/web_integrations/List-integration-accounts-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-16T00:21:55.952Z \ No newline at end of file diff --git a/cassettes/features/v2/web_integrations/List-integration-accounts-returns-OK-response.yml b/cassettes/features/v2/web_integrations/List-integration-accounts-returns-OK-response.yml new file mode 100644 index 00000000000..b13c86ce428 --- /dev/null +++ b/cassettes/features/v2/web_integrations/List-integration-accounts-returns-OK-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Fri, 16 Jan 2026 00:21:55 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-List_integration_accounts_returns_OK_response-1768522915","secrets":{"api_key_token":"test_secret_token_value"},"settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}},"type":"Account"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"a491e2ce-8537-4015-8552-d76b23f9c2a2","type":"Account","attributes":{"name":"Test-List_integration_accounts_returns_OK_response-1768522915","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 16 Jan 2026 00:21:55 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"cea19da0-127c-46bd-af1f-dab6524dc139","type":"Account","attributes":{"name":"Test-Create_integration_account_returns_Created_response-1768495642","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}},{"id":"07527a04-9eab-4528-8d55-072bb4cbfdfd","type":"Account","attributes":{"name":"Test-Get_integration_account_returns_OK_response-1768495644","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}},{"id":"efa743ed-c968-49df-97ce-f078b8f6a871","type":"Account","attributes":{"name":"Test-List_integration_accounts_returns_OK_response-1768495645","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}},{"id":"4fe972b3-5a53-414f-9304-0a683f403f46","type":"Account","attributes":{"name":"Test-Update_integration_account_returns_OK_response-1768495646-updated","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":false,"censor_logs":true,"events":false,"messages":false}}},{"id":"591eebe4-998f-49f0-b5db-a6b76e3ff392","type":"Account","attributes":{"name":"Test-Create_integration_account_returns_Created_response-1768522912","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}},{"id":"945d4bbe-d24e-4530-a4db-3dc27329e5e8","type":"Account","attributes":{"name":"Test-Get_integration_account_returns_OK_response-1768522914","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}},{"id":"a491e2ce-8537-4015-8552-d76b23f9c2a2","type":"Account","attributes":{"name":"Test-List_integration_accounts_returns_OK_response-1768522915","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/web_integrations/Update-integration-account-returns-OK-response.frozen b/cassettes/features/v2/web_integrations/Update-integration-account-returns-OK-response.frozen new file mode 100644 index 00000000000..954730cedd3 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Update-integration-account-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-16T00:21:56.916Z \ No newline at end of file diff --git a/cassettes/features/v2/web_integrations/Update-integration-account-returns-OK-response.yml b/cassettes/features/v2/web_integrations/Update-integration-account-returns-OK-response.yml new file mode 100644 index 00000000000..e799914f5e6 --- /dev/null +++ b/cassettes/features/v2/web_integrations/Update-integration-account-returns-OK-response.yml @@ -0,0 +1,46 @@ +http_interactions: +- recorded_at: Fri, 16 Jan 2026 00:21:56 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Update_integration_account_returns_OK_response-1768522916","secrets":{"api_key_token":"test_secret_token_value"},"settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}},"type":"Account"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"4458ffbb-09e3-4b11-8b59-7ac39a766164","type":"Account","attributes":{"name":"Test-Update_integration_account_returns_OK_response-1768522916","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":true,"censor_logs":true,"events":true,"messages":true}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 16 Jan 2026 00:21:56 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Update_integration_account_returns_OK_response-1768522916-updated","settings":{"ccm_enabled":false,"events":false,"messages":false}},"type":"Account"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/web-integrations/twilio/accounts/4458ffbb-09e3-4b11-8b59-7ac39a766164 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"4458ffbb-09e3-4b11-8b59-7ac39a766164","type":"Account","attributes":{"name":"Test-Update_integration_account_returns_OK_response-1768522916-updated","settings":{"account_sid":"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","alerts":true,"api_key":"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","call_summaries":true,"ccm_enabled":false,"censor_logs":true,"events":false,"messages":false}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.rb b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.rb deleted file mode 100644 index e4d8b50b439..00000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1315707136.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Get all suppression rules returns "OK" response with sort ascending - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "suppression" in the system -SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"] - -# there is a valid "suppression2" in the system -SUPPRESSION2_DATA_ID = ENV["SUPPRESSION2_DATA_ID"] -opts = { - sort: SecurityMonitoringSuppressionSort::NAME, - query: "id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", -} -p api_instance.list_security_monitoring_suppressions(opts) diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.rb b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.rb deleted file mode 100644 index ea5cdb65b90..00000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_1741429096.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Get all suppression rules returns "OK" response with sort descending - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "suppression" in the system -SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"] - -# there is a valid "suppression2" in the system -SUPPRESSION2_DATA_ID = ENV["SUPPRESSION2_DATA_ID"] -opts = { - sort: SecurityMonitoringSuppressionSort::NAME_DESCENDING, - query: "id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", -} -p api_instance.list_security_monitoring_suppressions(opts) diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.rb b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.rb deleted file mode 100644 index 5e38d9bb571..00000000000 --- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions_3985905558.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Get all suppression rules returns "OK" response with pagination - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "suppression" in the system -SUPPRESSION_DATA_ID = ENV["SUPPRESSION_DATA_ID"] - -# there is a valid "suppression2" in the system -SUPPRESSION2_DATA_ID = ENV["SUPPRESSION2_DATA_ID"] -opts = { - page_size: 1, - page_number: 0, - query: "id:3dd-0uc-h1s OR id:886e6c3e-e543-049c-ee1b-56a1110295c0", -} -p api_instance.list_security_monitoring_suppressions(opts) diff --git a/examples/v2/web-integrations/CreateWebIntegrationAccount.rb b/examples/v2/web-integrations/CreateWebIntegrationAccount.rb new file mode 100644 index 00000000000..480150433cf --- /dev/null +++ b/examples/v2/web-integrations/CreateWebIntegrationAccount.rb @@ -0,0 +1,20 @@ +# Create integration account returns "Created: The account was successfully created." response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new + +body = DatadogAPIClient::V2::WebIntegrationAccountCreateRequest.new({ + data: DatadogAPIClient::V2::WebIntegrationAccountCreateRequestData.new({ + attributes: DatadogAPIClient::V2::WebIntegrationAccountCreateRequestAttributes.new({ + name: "My Production Account", + secrets: { + "api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + }, + settings: { + "account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": "True", "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": "True", "ccm_enabled": "True", "censor_logs": "True", "events": "True", "messages": "True", + }, + }), + type: DatadogAPIClient::V2::WebIntegrationAccountType::ACCOUNT, + }), +}) +p api_instance.create_web_integration_account("integration_name", body) diff --git a/examples/v2/web-integrations/CreateWebIntegrationAccount_516494340.rb b/examples/v2/web-integrations/CreateWebIntegrationAccount_516494340.rb new file mode 100644 index 00000000000..4e7fb37e174 --- /dev/null +++ b/examples/v2/web-integrations/CreateWebIntegrationAccount_516494340.rb @@ -0,0 +1,20 @@ +# Create integration account returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new + +body = DatadogAPIClient::V2::WebIntegrationAccountCreateRequest.new({ + data: DatadogAPIClient::V2::WebIntegrationAccountCreateRequestData.new({ + type: DatadogAPIClient::V2::WebIntegrationAccountType::ACCOUNT, + attributes: DatadogAPIClient::V2::WebIntegrationAccountCreateRequestAttributes.new({ + name: "Example-Web-Integration", + settings: { + "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "events": "True", "messages": "True", "alerts": "True", "call_summaries": "True", "ccm_enabled": "True", "censor_logs": "True", + }, + secrets: { + "api_key_token": "test_secret_token", + }, + }), + }), +}) +p api_instance.create_web_integration_account("twilio", body) diff --git a/examples/v2/web-integrations/DeleteWebIntegrationAccount.rb b/examples/v2/web-integrations/DeleteWebIntegrationAccount.rb new file mode 100644 index 00000000000..2cabf2d88d0 --- /dev/null +++ b/examples/v2/web-integrations/DeleteWebIntegrationAccount.rb @@ -0,0 +1,5 @@ +# Delete integration account returns "OK: The account was successfully deleted." response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new +p api_instance.delete_web_integration_account("integration_name", "account_id") diff --git a/examples/v2/web-integrations/DeleteWebIntegrationAccount_3148550629.rb b/examples/v2/web-integrations/DeleteWebIntegrationAccount_3148550629.rb new file mode 100644 index 00000000000..dfa12050d65 --- /dev/null +++ b/examples/v2/web-integrations/DeleteWebIntegrationAccount_3148550629.rb @@ -0,0 +1,8 @@ +# Delete integration account returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new + +# there is a valid "web_integration_account" in the system +WEB_INTEGRATION_ACCOUNT_DATA_ID = ENV["WEB_INTEGRATION_ACCOUNT_DATA_ID"] +p api_instance.delete_web_integration_account("twilio", WEB_INTEGRATION_ACCOUNT_DATA_ID) diff --git a/examples/v2/web-integrations/GetWebIntegrationAccount.rb b/examples/v2/web-integrations/GetWebIntegrationAccount.rb new file mode 100644 index 00000000000..ce3a8cc05be --- /dev/null +++ b/examples/v2/web-integrations/GetWebIntegrationAccount.rb @@ -0,0 +1,5 @@ +# Get integration account returns "OK: The account details for the specified integration." response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new +p api_instance.get_web_integration_account("integration_name", "account_id") diff --git a/examples/v2/web-integrations/GetWebIntegrationAccountSchema.rb b/examples/v2/web-integrations/GetWebIntegrationAccountSchema.rb new file mode 100644 index 00000000000..c2f46ab6d0f --- /dev/null +++ b/examples/v2/web-integrations/GetWebIntegrationAccountSchema.rb @@ -0,0 +1,6 @@ +# Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration." +response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new +p api_instance.get_web_integration_account_schema("integration_name") diff --git a/examples/v2/web-integrations/GetWebIntegrationAccountSchema_2275808665.rb b/examples/v2/web-integrations/GetWebIntegrationAccountSchema_2275808665.rb new file mode 100644 index 00000000000..0e7eb18d4fc --- /dev/null +++ b/examples/v2/web-integrations/GetWebIntegrationAccountSchema_2275808665.rb @@ -0,0 +1,5 @@ +# Get account schema for an integration returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new +p api_instance.get_web_integration_account_schema("twilio") diff --git a/examples/v2/web-integrations/GetWebIntegrationAccount_2208305330.rb b/examples/v2/web-integrations/GetWebIntegrationAccount_2208305330.rb new file mode 100644 index 00000000000..dfbea7660bb --- /dev/null +++ b/examples/v2/web-integrations/GetWebIntegrationAccount_2208305330.rb @@ -0,0 +1,8 @@ +# Get integration account returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new + +# there is a valid "web_integration_account" in the system +WEB_INTEGRATION_ACCOUNT_DATA_ID = ENV["WEB_INTEGRATION_ACCOUNT_DATA_ID"] +p api_instance.get_web_integration_account("twilio", WEB_INTEGRATION_ACCOUNT_DATA_ID) diff --git a/examples/v2/web-integrations/ListWebIntegrationAccounts.rb b/examples/v2/web-integrations/ListWebIntegrationAccounts.rb new file mode 100644 index 00000000000..f76c6f5df59 --- /dev/null +++ b/examples/v2/web-integrations/ListWebIntegrationAccounts.rb @@ -0,0 +1,5 @@ +# List integration accounts returns "OK: List of all accounts for the specified integration." response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new +p api_instance.list_web_integration_accounts("integration_name") diff --git a/examples/v2/web-integrations/ListWebIntegrationAccounts_2909671841.rb b/examples/v2/web-integrations/ListWebIntegrationAccounts_2909671841.rb new file mode 100644 index 00000000000..f8960f17965 --- /dev/null +++ b/examples/v2/web-integrations/ListWebIntegrationAccounts_2909671841.rb @@ -0,0 +1,5 @@ +# List integration accounts returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new +p api_instance.list_web_integration_accounts("twilio") diff --git a/examples/v2/web-integrations/UpdateWebIntegrationAccount.rb b/examples/v2/web-integrations/UpdateWebIntegrationAccount.rb new file mode 100644 index 00000000000..9aef2535a4e --- /dev/null +++ b/examples/v2/web-integrations/UpdateWebIntegrationAccount.rb @@ -0,0 +1,20 @@ +# Update integration account returns "OK: The account was successfully updated." response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new + +body = DatadogAPIClient::V2::WebIntegrationAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::WebIntegrationAccountUpdateRequestData.new({ + attributes: DatadogAPIClient::V2::WebIntegrationAccountUpdateRequestAttributes.new({ + name: "My Production Account (Updated)", + secrets: { + "api_key_token": "new_secret_token_value", + }, + settings: { + "ccm_enabled": "True", "events": "True", "messages": "False", + }, + }), + type: DatadogAPIClient::V2::WebIntegrationAccountType::ACCOUNT, + }), +}) +p api_instance.update_web_integration_account("integration_name", "account_id", body) diff --git a/examples/v2/web-integrations/UpdateWebIntegrationAccount_3199996405.rb b/examples/v2/web-integrations/UpdateWebIntegrationAccount_3199996405.rb new file mode 100644 index 00000000000..97f4a6afb80 --- /dev/null +++ b/examples/v2/web-integrations/UpdateWebIntegrationAccount_3199996405.rb @@ -0,0 +1,20 @@ +# Update integration account returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::WebIntegrationsAPI.new + +# there is a valid "web_integration_account" in the system +WEB_INTEGRATION_ACCOUNT_DATA_ID = ENV["WEB_INTEGRATION_ACCOUNT_DATA_ID"] + +body = DatadogAPIClient::V2::WebIntegrationAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::WebIntegrationAccountUpdateRequestData.new({ + type: DatadogAPIClient::V2::WebIntegrationAccountType::ACCOUNT, + attributes: DatadogAPIClient::V2::WebIntegrationAccountUpdateRequestAttributes.new({ + name: "Example-Web-Integration-updated", + settings: { + "events": "False", "messages": "False", "ccm_enabled": "False", + }, + }), + }), +}) +p api_instance.update_web_integration_account("twilio", WEB_INTEGRATION_ACCOUNT_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index bb421b0260f..07f6409ab9c 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1559,9 +1559,6 @@ }, "v2.ListSecurityMonitoringSuppressions" => { "query" => "String", - "sort" => "SecurityMonitoringSuppressionSort", - "page_size" => "Integer", - "page_number" => "Integer", }, "v2.CreateSecurityMonitoringSuppression" => { "body" => "SecurityMonitoringSuppressionCreateRequest", @@ -3471,6 +3468,29 @@ "v2.ListUserPermissions" => { "user_id" => "String", }, + "v2.ListWebIntegrationAccounts" => { + "integration_name" => "String", + }, + "v2.CreateWebIntegrationAccount" => { + "integration_name" => "String", + "body" => "WebIntegrationAccountCreateRequest", + }, + "v2.GetWebIntegrationAccountSchema" => { + "integration_name" => "String", + }, + "v2.DeleteWebIntegrationAccount" => { + "integration_name" => "String", + "account_id" => "String", + }, + "v2.GetWebIntegrationAccount" => { + "integration_name" => "String", + "account_id" => "String", + }, + "v2.UpdateWebIntegrationAccount" => { + "integration_name" => "String", + "account_id" => "String", + "body" => "WebIntegrationAccountUpdateRequest", + }, "v2.CreateWorkflow" => { "body" => "CreateWorkflowRequest", }, diff --git a/features/v2/given.json b/features/v2/given.json index 9d69fd33f22..033ad012af7 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1035,7 +1035,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"{{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" } ], "step": "there is a valid \"suppression\" in the system", @@ -1043,18 +1043,6 @@ "tag": "Security Monitoring", "operationId": "CreateSecurityMonitoringSuppression" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression2 {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" - } - ], - "step": "there is a valid \"suppression2\" in the system", - "key": "suppression2", - "tag": "Security Monitoring", - "operationId": "CreateSecurityMonitoringSuppression" - }, { "parameters": [ { @@ -1333,6 +1321,22 @@ "tag": "Users", "operationId": "CreateUser" }, + { + "parameters": [ + { + "name": "integration_name", + "value": "\"twilio\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"Account\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"settings\": {\n \"api_key\": \"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"events\": true,\n \"messages\": true,\n \"alerts\": true,\n \"call_summaries\": true,\n \"ccm_enabled\": true,\n \"censor_logs\": true\n },\n \"secrets\": {\n \"api_key_token\": \"test_secret_token_value\"\n }\n }\n }\n}" + } + ], + "step": "there is a valid \"web_integration_account\" in the system", + "key": "web_integration_account", + "tag": "Web Integrations", + "operationId": "CreateWebIntegrationAccount" + }, { "parameters": [ { diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 60e9df68bb9..2a6c599c306 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -1124,40 +1124,6 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @team:DataDog/k9-cloud-security-platform - Scenario: Get all suppression rules returns "OK" response with pagination - Given new "ListSecurityMonitoringSuppressions" request - And there is a valid "suppression" in the system - And there is a valid "suppression2" in the system - And request contains "page[size]" parameter with value 1 - And request contains "page[number]" parameter with value 0 - And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - - @team:DataDog/k9-cloud-security-platform - Scenario: Get all suppression rules returns "OK" response with sort ascending - Given new "ListSecurityMonitoringSuppressions" request - And there is a valid "suppression" in the system - And there is a valid "suppression2" in the system - And request contains "sort" parameter with value "name" - And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" - When the request is sent - Then the response status is 200 OK - And the response "data[0].attributes.name" is equal to "suppression {{ unique }}" - - @team:DataDog/k9-cloud-security-platform - Scenario: Get all suppression rules returns "OK" response with sort descending - Given new "ListSecurityMonitoringSuppressions" request - And there is a valid "suppression" in the system - And there is a valid "suppression2" in the system - And request contains "sort" parameter with value "-name" - And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" - When the request is sent - Then the response status is 200 OK - And the response "data[0].attributes.name" is equal to "suppression2 {{ unique }}" - @skip @team:DataDog/k9-cloud-security-platform Scenario: Get critical assets affecting a specific rule returns "Not Found" response Given new "GetCriticalAssetsAffectingRule" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 59046d30f0b..f29fa89a8ae 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -5045,6 +5045,53 @@ "type": "safe" } }, + "ListWebIntegrationAccounts": { + "tag": "Web Integrations", + "undo": { + "type": "safe" + } + }, + "CreateWebIntegrationAccount": { + "tag": "Web Integrations", + "undo": { + "operationId": "DeleteWebIntegrationAccount", + "parameters": [ + { + "name": "integration_name", + "source": "integration_name" + }, + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "GetWebIntegrationAccountSchema": { + "tag": "Web Integrations", + "undo": { + "type": "safe" + } + }, + "DeleteWebIntegrationAccount": { + "tag": "Web Integrations", + "undo": { + "type": "idempotent" + } + }, + "GetWebIntegrationAccount": { + "tag": "Web Integrations", + "undo": { + "type": "safe" + } + }, + "UpdateWebIntegrationAccount": { + "tag": "Web Integrations", + "undo": { + "type": "idempotent" + } + }, "CreateWorkflow": { "tag": "Workflow Automation", "undo": { diff --git a/features/v2/web_integrations.feature b/features/v2/web_integrations.feature new file mode 100644 index 00000000000..a91bc2350a5 --- /dev/null +++ b/features/v2/web_integrations.feature @@ -0,0 +1,258 @@ +@endpoint(web-integrations) @endpoint(web-integrations-v2) +Feature: Web Integrations + Configure and manage third-party web integrations with Datadog. This API + provides a unified interface for managing integration accounts across + various external services. Each integration has its own unique schema + that defines the required settings and secrets. Before creating or + updating an account, use the schema endpoint to retrieve the specific + requirements, field types, validation rules, and available configuration + options for your integration. Supported Integrations: - twilio - + snowflake-web - databricks + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "WebIntegrations" API + + @skip @team:DataDog/web-integrations + Scenario: Create integration account returns "Bad Request" response with invalid integration name + Given new "CreateWebIntegrationAccount" request + And request contains "integration_name" parameter with value "invalid-integration-name" + And body with value {"data": {"type": "Account", "attributes": {"name": "Test Account", "settings": {"api_key": "SKtest", "account_sid": "ACtest", "events": true, "messages": true, "alerts": true, "call_summaries": true, "ccm_enabled": true, "censor_logs": true}, "secrets": {"api_key_token": "test_token"}}}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/web-integrations + Scenario: Create integration account returns "Bad Request: The request body is malformed or the integration name format is invalid." response + Given new "CreateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} + When the request is sent + Then the response status is 400 Bad Request: The request body is malformed or the integration name format is invalid. + + @skip @team:DataDog/web-integrations + Scenario: Create integration account returns "Created" response + Given new "CreateWebIntegrationAccount" request + And request contains "integration_name" parameter with value "twilio" + And body with value {"data": {"type": "Account", "attributes": {"name": "{{ unique }}", "settings": {"api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "events": true, "messages": true, "alerts": true, "call_summaries": true, "ccm_enabled": true, "censor_logs": true}, "secrets": {"api_key_token": "test_secret_token"}}}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "Account" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.settings.api_key" is equal to "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + And the response "data.attributes.settings.account_sid" is equal to "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + + @generated @skip @team:DataDog/web-integrations + Scenario: Create integration account returns "Created: The account was successfully created." response + Given new "CreateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} + When the request is sent + Then the response status is 201 Created: The account was successfully created. + + @generated @skip @team:DataDog/web-integrations + Scenario: Create integration account returns "Not Found: The integration does not exist." response + Given new "CreateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} + When the request is sent + Then the response status is 404 Not Found: The integration does not exist. + + @skip @team:DataDog/web-integrations + Scenario: Create integration account returns "Unprocessable Entity" response with missing required field + Given new "CreateWebIntegrationAccount" request + And request contains "integration_name" parameter with value "twilio" + And body with value {"data": {"type": "Account", "attributes": {"name": "Test Account", "settings": {"api_key": "SKtest"}, "secrets": {"api_key_token": "test_token"}}}} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/web-integrations + Scenario: Create integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response + Given new "CreateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} + When the request is sent + Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema. + + @generated @skip @team:DataDog/web-integrations + Scenario: Delete integration account returns "Bad Request: The integration name or account ID format is invalid." response + Given new "DeleteWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request: The integration name or account ID format is invalid. + + @generated @skip @team:DataDog/web-integrations + Scenario: Delete integration account returns "Not Found: The integration or account does not exist." response + Given new "DeleteWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found: The integration or account does not exist. + + @skip @team:DataDog/web-integrations + Scenario: Delete integration account returns "OK" response + Given there is a valid "web_integration_account" in the system + And new "DeleteWebIntegrationAccount" request + And request contains "integration_name" parameter with value "twilio" + And request contains "account_id" parameter from "web_integration_account.data.id" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/web-integrations + Scenario: Delete integration account returns "OK: The account was successfully deleted." response + Given new "DeleteWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK: The account was successfully deleted. + + @generated @skip @team:DataDog/web-integrations + Scenario: Get account schema for an integration returns "Bad Request: The integration name format is invalid." response + Given new "GetWebIntegrationAccountSchema" request + And request contains "integration_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request: The integration name format is invalid. + + @generated @skip @team:DataDog/web-integrations + Scenario: Get account schema for an integration returns "Not Found: The integration does not exist or has no schema available." response + Given new "GetWebIntegrationAccountSchema" request + And request contains "integration_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found: The integration does not exist or has no schema available. + + @replay-only @team:DataDog/web-integrations + Scenario: Get account schema for an integration returns "OK" response + Given new "GetWebIntegrationAccountSchema" request + And request contains "integration_name" parameter with value "twilio" + When the request is sent + Then the response status is 200 OK + And the response "type" is equal to "object" + And the response "properties.settings.properties.api_key" has field "type" + And the response "properties.secrets.properties.api_key_token" has field "type" + + @generated @skip @team:DataDog/web-integrations + Scenario: Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration." response + Given new "GetWebIntegrationAccountSchema" request + And request contains "integration_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK: The JSON schema for the integration's account configuration. + + @generated @skip @team:DataDog/web-integrations + Scenario: Get integration account returns "Bad Request: The integration name or account ID format is invalid." response + Given new "GetWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request: The integration name or account ID format is invalid. + + @generated @skip @team:DataDog/web-integrations + Scenario: Get integration account returns "Not Found: The integration or account does not exist." response + Given new "GetWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found: The integration or account does not exist. + + @skip @team:DataDog/web-integrations + Scenario: Get integration account returns "OK" response + Given there is a valid "web_integration_account" in the system + And new "GetWebIntegrationAccount" request + And request contains "integration_name" parameter with value "twilio" + And request contains "account_id" parameter from "web_integration_account.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "Account" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.settings" has field "api_key" + And the response "data.attributes.settings" has field "account_sid" + + @generated @skip @team:DataDog/web-integrations + Scenario: Get integration account returns "OK: The account details for the specified integration." response + Given new "GetWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK: The account details for the specified integration. + + @generated @skip @team:DataDog/web-integrations + Scenario: List integration accounts returns "Bad Request: The integration name format is invalid." response + Given new "ListWebIntegrationAccounts" request + And request contains "integration_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request: The integration name format is invalid. + + @generated @skip @team:DataDog/web-integrations + Scenario: List integration accounts returns "Not Found: The integration does not exist." response + Given new "ListWebIntegrationAccounts" request + And request contains "integration_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found: The integration does not exist. + + @skip @team:DataDog/web-integrations + Scenario: List integration accounts returns "OK" response + Given there is a valid "web_integration_account" in the system + And new "ListWebIntegrationAccounts" request + And request contains "integration_name" parameter with value "twilio" + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "Account" + And the response "data[0].attributes" has field "name" + And the response "data[0].attributes" has field "settings" + + @generated @skip @team:DataDog/web-integrations + Scenario: List integration accounts returns "OK: List of all accounts for the specified integration." response + Given new "ListWebIntegrationAccounts" request + And request contains "integration_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK: List of all accounts for the specified integration. + + @generated @skip @team:DataDog/web-integrations + Scenario: Update integration account returns "Bad Request: The request body is malformed or the integration name/account ID format is invalid." response + Given new "UpdateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} + When the request is sent + Then the response status is 400 Bad Request: The request body is malformed or the integration name/account ID format is invalid. + + @generated @skip @team:DataDog/web-integrations + Scenario: Update integration account returns "Not Found: The integration or account does not exist." response + Given new "UpdateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} + When the request is sent + Then the response status is 404 Not Found: The integration or account does not exist. + + @skip @team:DataDog/web-integrations + Scenario: Update integration account returns "OK" response + Given there is a valid "web_integration_account" in the system + And new "UpdateWebIntegrationAccount" request + And request contains "integration_name" parameter with value "twilio" + And request contains "account_id" parameter from "web_integration_account.data.id" + And body with value {"data": {"type": "Account", "attributes": {"name": "{{ unique }}-updated", "settings": {"events": false, "messages": false, "ccm_enabled": false}}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "Account" + And the response "data.attributes.name" is equal to "{{ unique }}-updated" + And the response "data.attributes.settings.events" is false + And the response "data.attributes.settings.messages" is false + + @generated @skip @team:DataDog/web-integrations + Scenario: Update integration account returns "OK: The account was successfully updated." response + Given new "UpdateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} + When the request is sent + Then the response status is 200 OK: The account was successfully updated. + + @generated @skip @team:DataDog/web-integrations + Scenario: Update integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response + Given new "UpdateWebIntegrationAccount" request + And request contains "integration_name" parameter from "REPLACE.ME" + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} + When the request is sent + Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema. diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index eab18ec23f5..826e84346ef 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4066,7 +4066,6 @@ def overrides "v2.security_monitoring_filter" => "SecurityMonitoringFilter", "v2.security_monitoring_filter_action" => "SecurityMonitoringFilterAction", "v2.security_monitoring_list_rules_response" => "SecurityMonitoringListRulesResponse", - "v2.security_monitoring_paginated_suppressions_response" => "SecurityMonitoringPaginatedSuppressionsResponse", "v2.security_monitoring_reference_table" => "SecurityMonitoringReferenceTable", "v2.security_monitoring_rule_anomaly_detection_options" => "SecurityMonitoringRuleAnomalyDetectionOptions", "v2.security_monitoring_rule_anomaly_detection_options_bucket_duration" => "SecurityMonitoringRuleAnomalyDetectionOptionsBucketDuration", @@ -4157,9 +4156,6 @@ def overrides "v2.security_monitoring_suppression_create_data" => "SecurityMonitoringSuppressionCreateData", "v2.security_monitoring_suppression_create_request" => "SecurityMonitoringSuppressionCreateRequest", "v2.security_monitoring_suppression_response" => "SecurityMonitoringSuppressionResponse", - "v2.security_monitoring_suppressions_meta" => "SecurityMonitoringSuppressionsMeta", - "v2.security_monitoring_suppression_sort" => "SecurityMonitoringSuppressionSort", - "v2.security_monitoring_suppressions_page_meta" => "SecurityMonitoringSuppressionsPageMeta", "v2.security_monitoring_suppressions_response" => "SecurityMonitoringSuppressionsResponse", "v2.security_monitoring_suppression_type" => "SecurityMonitoringSuppressionType", "v2.security_monitoring_suppression_update_attributes" => "SecurityMonitoringSuppressionUpdateAttributes", @@ -4767,6 +4763,22 @@ def overrides "v2.vulnerability_status" => "VulnerabilityStatus", "v2.vulnerability_tool" => "VulnerabilityTool", "v2.vulnerability_type" => "VulnerabilityType", + "v2.web_integration_account_attributes" => "WebIntegrationAccountAttributes", + "v2.web_integration_account_create_request" => "WebIntegrationAccountCreateRequest", + "v2.web_integration_account_create_request_attributes" => "WebIntegrationAccountCreateRequestAttributes", + "v2.web_integration_account_create_request_data" => "WebIntegrationAccountCreateRequestData", + "v2.web_integration_account_response" => "WebIntegrationAccountResponse", + "v2.web_integration_account_response_data" => "WebIntegrationAccountResponseData", + "v2.web_integration_account_schema_response" => "WebIntegrationAccountSchemaResponse", + "v2.web_integration_account_schema_response_properties" => "WebIntegrationAccountSchemaResponseProperties", + "v2.web_integration_account_schema_response_secrets_object" => "WebIntegrationAccountSchemaResponseSecretsObject", + "v2.web_integration_account_schema_response_settings_field" => "WebIntegrationAccountSchemaResponseSettingsField", + "v2.web_integration_account_schema_response_settings_object" => "WebIntegrationAccountSchemaResponseSettingsObject", + "v2.web_integration_accounts_response" => "WebIntegrationAccountsResponse", + "v2.web_integration_account_type" => "WebIntegrationAccountType", + "v2.web_integration_account_update_request" => "WebIntegrationAccountUpdateRequest", + "v2.web_integration_account_update_request_attributes" => "WebIntegrationAccountUpdateRequestAttributes", + "v2.web_integration_account_update_request_data" => "WebIntegrationAccountUpdateRequestData", "v2.weekday" => "Weekday", "v2.widget_live_span" => "WidgetLiveSpan", "v2.workflow_data" => "WorkflowData", @@ -4914,6 +4926,7 @@ def overrides "v2.test_optimization_api" => "TestOptimizationAPI", "v2.usage_metering_api" => "UsageMeteringAPI", "v2.users_api" => "UsersAPI", + "v2.web_integrations_api" => "WebIntegrationsAPI", "v2.workflow_automation_api" => "WorkflowAutomationAPI" } end diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index a62476064c5..f8bc15c5bcc 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -4384,28 +4384,18 @@ def list_security_monitoring_suppressions(opts = {}) # # @param opts [Hash] the optional parameters # @option opts [String] :query Query string. - # @option opts [SecurityMonitoringSuppressionSort] :sort Attribute used to sort the list of suppression rules. Prefix with `-` to sort in descending order. - # @option opts [Integer] :page_size Size for a given page. Use `-1` to return all items. - # @option opts [Integer] :page_number Specific page number to return. - # @return [Array<(SecurityMonitoringPaginatedSuppressionsResponse, Integer, Hash)>] SecurityMonitoringPaginatedSuppressionsResponse data, response status code and response headers + # @return [Array<(SecurityMonitoringSuppressionsResponse, Integer, Hash)>] SecurityMonitoringSuppressionsResponse data, response status code and response headers def list_security_monitoring_suppressions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_suppressions ...' end - allowable_values = ['name', 'start_date', 'expiration_date', 'update_date', 'enabled', '-name', '-start_date', '-expiration_date', '-update_date', '-enabled'] - if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) - fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" - end # resource path local_var_path = '/api/v2/security_monitoring/configuration/suppressions' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? # header parameters header_params = opts[:header_params] || {} @@ -4419,7 +4409,7 @@ def list_security_monitoring_suppressions_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringPaginatedSuppressionsResponse' + return_type = opts[:debug_return_type] || 'SecurityMonitoringSuppressionsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] diff --git a/lib/datadog_api_client/v2/api/web_integrations_api.rb b/lib/datadog_api_client/v2/api/web_integrations_api.rb new file mode 100644 index 00000000000..60c2b194b7e --- /dev/null +++ b/lib/datadog_api_client/v2/api/web_integrations_api.rb @@ -0,0 +1,463 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class WebIntegrationsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create integration account. + # + # @see #create_web_integration_account_with_http_info + def create_web_integration_account(integration_name, body, opts = {}) + data, _status_code, _headers = create_web_integration_account_with_http_info(integration_name, body, opts) + data + end + + # Create integration account. + # + # Create a new account for a specific integration. The account configuration must conform + # to the schema defined for the integration, which can be retrieved using the schema endpoint. + # + # Rate limit: 50 requests per user every 20 seconds. + # + # @param integration_name [String] The name of the integration. + # @param body [WebIntegrationAccountCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(WebIntegrationAccountResponse, Integer, Hash)>] WebIntegrationAccountResponse data, response status code and response headers + def create_web_integration_account_with_http_info(integration_name, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WebIntegrationsAPI.create_web_integration_account ...' + end + # verify the required parameter 'integration_name' is set + if @api_client.config.client_side_validation && integration_name.nil? + fail ArgumentError, "Missing the required parameter 'integration_name' when calling WebIntegrationsAPI.create_web_integration_account" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling WebIntegrationsAPI.create_web_integration_account" + end + # resource path + local_var_path = '/api/v2/web-integrations/{integration_name}/accounts'.sub('{integration_name}', CGI.escape(integration_name.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'WebIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_web_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WebIntegrationsAPI#create_web_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete integration account. + # + # @see #delete_web_integration_account_with_http_info + def delete_web_integration_account(integration_name, account_id, opts = {}) + delete_web_integration_account_with_http_info(integration_name, account_id, opts) + nil + end + + # Delete integration account. + # + # Delete a specific account by its ID for a given integration. This will remove the + # account configuration and stop any data collection associated with it. + # + # Rate limit: 50 requests per user every 20 seconds. + # + # @param integration_name [String] The name of the integration. + # @param account_id [String] The unique identifier of the account. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_web_integration_account_with_http_info(integration_name, account_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WebIntegrationsAPI.delete_web_integration_account ...' + end + # verify the required parameter 'integration_name' is set + if @api_client.config.client_side_validation && integration_name.nil? + fail ArgumentError, "Missing the required parameter 'integration_name' when calling WebIntegrationsAPI.delete_web_integration_account" + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling WebIntegrationsAPI.delete_web_integration_account" + end + # resource path + local_var_path = '/api/v2/web-integrations/{integration_name}/accounts/{account_id}'.sub('{integration_name}', CGI.escape(integration_name.to_s).gsub('%2F', '/')).sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_web_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WebIntegrationsAPI#delete_web_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get integration account. + # + # @see #get_web_integration_account_with_http_info + def get_web_integration_account(integration_name, account_id, opts = {}) + data, _status_code, _headers = get_web_integration_account_with_http_info(integration_name, account_id, opts) + data + end + + # Get integration account. + # + # Retrieve a specific account by its ID for a given integration. The response includes + # the account name and settings, but excludes sensitive secret values. + # + # Rate limit: 12000 requests per organization every 60 seconds. + # + # @param integration_name [String] The name of the integration. + # @param account_id [String] The unique identifier of the account. + # @param opts [Hash] the optional parameters + # @return [Array<(WebIntegrationAccountResponse, Integer, Hash)>] WebIntegrationAccountResponse data, response status code and response headers + def get_web_integration_account_with_http_info(integration_name, account_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WebIntegrationsAPI.get_web_integration_account ...' + end + # verify the required parameter 'integration_name' is set + if @api_client.config.client_side_validation && integration_name.nil? + fail ArgumentError, "Missing the required parameter 'integration_name' when calling WebIntegrationsAPI.get_web_integration_account" + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling WebIntegrationsAPI.get_web_integration_account" + end + # resource path + local_var_path = '/api/v2/web-integrations/{integration_name}/accounts/{account_id}'.sub('{integration_name}', CGI.escape(integration_name.to_s).gsub('%2F', '/')).sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'WebIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_web_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WebIntegrationsAPI#get_web_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get account schema for an integration. + # + # @see #get_web_integration_account_schema_with_http_info + def get_web_integration_account_schema(integration_name, opts = {}) + data, _status_code, _headers = get_web_integration_account_schema_with_http_info(integration_name, opts) + data + end + + # Get account schema for an integration. + # + # Get the JSON schema that defines the structure and validation rules for account configuration + # of a specific integration. This schema describes the required and optional fields for both + # settings and secrets when creating or updating an account. + # + # Rate limit: 12000 requests per organization every 60 seconds. + # + # @param integration_name [String] The name of the integration. + # @param opts [Hash] the optional parameters + # @return [Array<(WebIntegrationAccountSchemaResponse, Integer, Hash)>] WebIntegrationAccountSchemaResponse data, response status code and response headers + def get_web_integration_account_schema_with_http_info(integration_name, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WebIntegrationsAPI.get_web_integration_account_schema ...' + end + # verify the required parameter 'integration_name' is set + if @api_client.config.client_side_validation && integration_name.nil? + fail ArgumentError, "Missing the required parameter 'integration_name' when calling WebIntegrationsAPI.get_web_integration_account_schema" + end + # resource path + local_var_path = '/api/v2/web-integrations/{integration_name}/accounts/schema'.sub('{integration_name}', CGI.escape(integration_name.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'WebIntegrationAccountSchemaResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_web_integration_account_schema, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WebIntegrationsAPI#get_web_integration_account_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List integration accounts. + # + # @see #list_web_integration_accounts_with_http_info + def list_web_integration_accounts(integration_name, opts = {}) + data, _status_code, _headers = list_web_integration_accounts_with_http_info(integration_name, opts) + data + end + + # List integration accounts. + # + # Retrieve all configured accounts for a specific integration within your organization. + # + # Rate limit: 50 requests per user every 20 seconds. + # + # @param integration_name [String] The name of the integration. + # @param opts [Hash] the optional parameters + # @return [Array<(WebIntegrationAccountsResponse, Integer, Hash)>] WebIntegrationAccountsResponse data, response status code and response headers + def list_web_integration_accounts_with_http_info(integration_name, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WebIntegrationsAPI.list_web_integration_accounts ...' + end + # verify the required parameter 'integration_name' is set + if @api_client.config.client_side_validation && integration_name.nil? + fail ArgumentError, "Missing the required parameter 'integration_name' when calling WebIntegrationsAPI.list_web_integration_accounts" + end + # resource path + local_var_path = '/api/v2/web-integrations/{integration_name}/accounts'.sub('{integration_name}', CGI.escape(integration_name.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'WebIntegrationAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_web_integration_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WebIntegrationsAPI#list_web_integration_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update integration account. + # + # @see #update_web_integration_account_with_http_info + def update_web_integration_account(integration_name, account_id, body, opts = {}) + data, _status_code, _headers = update_web_integration_account_with_http_info(integration_name, account_id, body, opts) + data + end + + # Update integration account. + # + # Update an existing account for a specific integration. You can update the name, settings, + # and/or secrets. Only the fields provided in the request will be updated. + # + # Rate limit: 50 requests per user every 20 seconds. + # + # @param integration_name [String] The name of the integration. + # @param account_id [String] The unique identifier of the account. + # @param body [WebIntegrationAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(WebIntegrationAccountResponse, Integer, Hash)>] WebIntegrationAccountResponse data, response status code and response headers + def update_web_integration_account_with_http_info(integration_name, account_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WebIntegrationsAPI.update_web_integration_account ...' + end + # verify the required parameter 'integration_name' is set + if @api_client.config.client_side_validation && integration_name.nil? + fail ArgumentError, "Missing the required parameter 'integration_name' when calling WebIntegrationsAPI.update_web_integration_account" + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling WebIntegrationsAPI.update_web_integration_account" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling WebIntegrationsAPI.update_web_integration_account" + end + # resource path + local_var_path = '/api/v2/web-integrations/{integration_name}/accounts/{account_id}'.sub('{integration_name}', CGI.escape(integration_name.to_s).gsub('%2F', '/')).sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'WebIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_web_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WebIntegrationsAPI#update_web_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_attributes.rb b/lib/datadog_api_client/v2/models/web_integration_account_attributes.rb new file mode 100644 index 00000000000..2c8693ab687 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_attributes.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for a web integration account. + class WebIntegrationAccountAttributes + include BaseGenericModel + + # The name of the account. + attr_reader :name + + # Integration-specific settings for the account. The structure and required fields vary by integration type. + # Use the schema endpoint to retrieve the specific requirements for each integration. + attr_reader :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'settings' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_page_meta.rb b/lib/datadog_api_client/v2/models/web_integration_account_create_request.rb similarity index 70% rename from lib/datadog_api_client/v2/models/security_monitoring_suppressions_page_meta.rb rename to lib/datadog_api_client/v2/models/web_integration_account_create_request.rb index 35152ade3c3..1ed2eb271cd 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_page_meta.rb +++ b/lib/datadog_api_client/v2/models/web_integration_account_create_request.rb @@ -17,18 +17,12 @@ require 'time' module DatadogAPIClient::V2 - # Pagination metadata. - class SecurityMonitoringSuppressionsPageMeta + # Payload for creating a web integration account. + class WebIntegrationAccountCreateRequest include BaseGenericModel - # Current page number. - attr_accessor :page_number - - # Current page size. - attr_accessor :page_size - - # Total count of suppressions. - attr_accessor :total_count + # Data object for creating a web integration account. + attr_reader :data attr_accessor :additional_properties @@ -36,9 +30,7 @@ class SecurityMonitoringSuppressionsPageMeta # @!visibility private def self.attribute_map { - :'page_number' => :'pageNumber', - :'page_size' => :'pageSize', - :'total_count' => :'totalCount' + :'data' => :'data' } end @@ -46,9 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'page_number' => :'Integer', - :'page_size' => :'Integer', - :'total_count' => :'Integer' + :'data' => :'WebIntegrationAccountCreateRequestData' } end @@ -57,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionsPageMeta` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountCreateRequest` initialize method" end self.additional_properties = {} @@ -70,17 +60,27 @@ def initialize(attributes = {}) end } - if attributes.key?(:'page_number') - self.page_number = attributes[:'page_number'] + if attributes.key?(:'data') + self.data = attributes[:'data'] end + end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] - end + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end - if attributes.key?(:'total_count') - self.total_count = attributes[:'total_count'] + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' end + @data = data end # Returns the object in the form of hash, with additionalProperties support. @@ -109,9 +109,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - page_number == o.page_number && - page_size == o.page_size && - total_count == o.total_count && + data == o.data && additional_properties == o.additional_properties end @@ -119,7 +117,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [page_number, page_size, total_count, additional_properties].hash + [data, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_create_request_attributes.rb b/lib/datadog_api_client/v2/models/web_integration_account_create_request_attributes.rb new file mode 100644 index 00000000000..8609668c7be --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_create_request_attributes.rb @@ -0,0 +1,169 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating a web integration account. + class WebIntegrationAccountCreateRequestAttributes + include BaseGenericModel + + # The name of the account. + attr_reader :name + + # Sensitive credentials for the account. The structure and required fields vary by integration type. + # These values are write-only and never returned in responses. Use the schema endpoint to determine + # which secret fields are required for your specific integration. + attr_reader :secrets + + # Integration-specific settings for the account. The structure and required fields vary by integration type. + # Use the schema endpoint (GET /api/v2/web-integrations/{integration_name}/accounts/schema) to retrieve + # the specific requirements for your integration before creating an account. + attr_reader :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'secrets' => :'secrets', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'secrets' => :'Hash', + :'settings' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountCreateRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'secrets') + self.secrets = attributes[:'secrets'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @secrets.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param secrets [Object] Object to be assigned + # @!visibility private + def secrets=(secrets) + if secrets.nil? + fail ArgumentError, 'invalid value for "secrets", secrets cannot be nil.' + end + @secrets = secrets + end + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + secrets == o.secrets && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, secrets, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_create_request_data.rb b/lib/datadog_api_client/v2/models/web_integration_account_create_request_data.rb new file mode 100644 index 00000000000..b0432892d2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_create_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for creating a web integration account. + class WebIntegrationAccountCreateRequestData + include BaseGenericModel + + # Attributes for creating a web integration account. + attr_reader :attributes + + # The JSON:API type for web integration accounts. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'WebIntegrationAccountCreateRequestAttributes', + :'type' => :'WebIntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountCreateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_meta.rb b/lib/datadog_api_client/v2/models/web_integration_account_response.rb similarity index 75% rename from lib/datadog_api_client/v2/models/security_monitoring_suppressions_meta.rb rename to lib/datadog_api_client/v2/models/web_integration_account_response.rb index 170b6a914c8..d7c4706b1a7 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_meta.rb +++ b/lib/datadog_api_client/v2/models/web_integration_account_response.rb @@ -17,12 +17,15 @@ require 'time' module DatadogAPIClient::V2 - # Metadata for the suppression list response. - class SecurityMonitoringSuppressionsMeta + # Response containing a single web integration account. + class WebIntegrationAccountResponse include BaseGenericModel - # Pagination metadata. - attr_accessor :page + # Data object for a web integration account response. + attr_accessor :data + + # The name of the integration. + attr_accessor :integration_name attr_accessor :additional_properties @@ -30,7 +33,8 @@ class SecurityMonitoringSuppressionsMeta # @!visibility private def self.attribute_map { - :'page' => :'page' + :'data' => :'data', + :'integration_name' => :'integration_name' } end @@ -38,7 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'page' => :'SecurityMonitoringSuppressionsPageMeta' + :'data' => :'WebIntegrationAccountResponseData', + :'integration_name' => :'String' } end @@ -47,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionsMeta` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountResponse` initialize method" end self.additional_properties = {} @@ -60,8 +65,12 @@ def initialize(attributes = {}) end } - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'integration_name') + self.integration_name = attributes[:'integration_name'] end end @@ -91,7 +100,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - page == o.page && + data == o.data && + integration_name == o.integration_name && additional_properties == o.additional_properties end @@ -99,7 +109,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [page, additional_properties].hash + [data, integration_name, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_response_data.rb b/lib/datadog_api_client/v2/models/web_integration_account_response_data.rb new file mode 100644 index 00000000000..ae349de46d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for a web integration account response. + class WebIntegrationAccountResponseData + include BaseGenericModel + + # Attributes for a web integration account. + attr_reader :attributes + + # The unique identifier for the account. + attr_reader :id + + # The JSON:API type for web integration accounts. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'WebIntegrationAccountAttributes', + :'id' => :'String', + :'type' => :'WebIntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_schema_response.rb b/lib/datadog_api_client/v2/models/web_integration_account_schema_response.rb new file mode 100644 index 00000000000..0f2a64e5432 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_schema_response.rb @@ -0,0 +1,205 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing the JSON schema for an integration's account configuration. + # This schema defines the required and optional fields for both settings and secrets, + # including field types, validation rules, and descriptions. + # + # The response is a standard [JSON Schema (draft-07)](https://json-schema.org/draft-07/schema#) document describing the account + # configuration structure. Since this is a dynamic JSON Schema, the exact properties + # will vary by integration. + class WebIntegrationAccountSchemaResponse + include BaseGenericModel + + # The JSON Schema version URI. + attr_reader :_schema + + # Whether additional properties are allowed at the root level (typically false). + attr_accessor :additional_properties + + # The properties object containing settings and secrets schema definitions. + # Both are always present in every integration schema. + attr_reader :properties + + # List of required top-level properties. + attr_reader :required + + # The root type of the schema (always "object"). + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'_schema' => :'$schema', + :'additional_properties' => :'additionalProperties', + :'properties' => :'properties', + :'required' => :'required', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'_schema' => :'String', + :'additional_properties' => :'Boolean', + :'properties' => :'WebIntegrationAccountSchemaResponseProperties', + :'required' => :'Array', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountSchemaResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'_schema') + self._schema = attributes[:'_schema'] + end + + if attributes.key?(:'additional_properties') + self.additional_properties = attributes[:'additional_properties'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'required') + if (value = attributes[:'required']).is_a?(Array) + self.required = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @_schema.nil? + return false if @properties.nil? + return false if @required.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param _schema [Object] Object to be assigned + # @!visibility private + def _schema=(_schema) + if _schema.nil? + fail ArgumentError, 'invalid value for "_schema", _schema cannot be nil.' + end + @_schema = _schema + end + + # Custom attribute writer method with validation + # @param properties [Object] Object to be assigned + # @!visibility private + def properties=(properties) + if properties.nil? + fail ArgumentError, 'invalid value for "properties", properties cannot be nil.' + end + @properties = properties + end + + # Custom attribute writer method with validation + # @param required [Object] Object to be assigned + # @!visibility private + def required=(required) + if required.nil? + fail ArgumentError, 'invalid value for "required", required cannot be nil.' + end + @required = required + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _schema == o._schema && + additional_properties == o.additional_properties && + properties == o.properties && + required == o.required && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [_schema, additional_properties, properties, required, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_schema_response_properties.rb b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_properties.rb new file mode 100644 index 00000000000..75b25bf15c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_properties.rb @@ -0,0 +1,149 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The properties object containing settings and secrets schema definitions. + # Both are always present in every integration schema. + class WebIntegrationAccountSchemaResponseProperties + include BaseGenericModel + + # JSON Schema definition for the secrets object. + # Contains sensitive credentials required for the integration such as API keys, + # tokens, and passwords. These values are write-only and never returned in responses. + attr_reader :secrets + + # JSON Schema definition for the settings object. + # Contains integration-specific configuration fields such as account identifiers, + # feature toggles, and non-sensitive configuration options. + attr_reader :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'secrets' => :'secrets', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'secrets' => :'WebIntegrationAccountSchemaResponseSecretsObject', + :'settings' => :'WebIntegrationAccountSchemaResponseSettingsObject' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountSchemaResponseProperties` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'secrets') + self.secrets = attributes[:'secrets'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @secrets.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param secrets [Object] Object to be assigned + # @!visibility private + def secrets=(secrets) + if secrets.nil? + fail ArgumentError, 'invalid value for "secrets", secrets cannot be nil.' + end + @secrets = secrets + end + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + secrets == o.secrets && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [secrets, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_schema_response_secrets_object.rb b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_secrets_object.rb new file mode 100644 index 00000000000..0a7103492fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_secrets_object.rb @@ -0,0 +1,140 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON Schema definition for the secrets object. + # Contains sensitive credentials required for the integration such as API keys, + # tokens, and passwords. These values are write-only and never returned in responses. + class WebIntegrationAccountSchemaResponseSecretsObject + include BaseGenericModel + + # Whether additional properties are allowed (typically false). + attr_accessor :additional_properties + + # The individual secret fields for this integration. + # Field names and types vary by integration. + attr_accessor :properties + + # List of required secret field names. + attr_accessor :required + + # Always "object" for the secrets container. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'additional_properties' => :'additionalProperties', + :'properties' => :'properties', + :'required' => :'required', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'additional_properties' => :'Boolean', + :'properties' => :'Hash', + :'required' => :'Array', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountSchemaResponseSecretsObject` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'additional_properties') + self.additional_properties = attributes[:'additional_properties'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'required') + if (value = attributes[:'required']).is_a?(Array) + self.required = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_properties == o.additional_properties && + properties == o.properties && + required == o.required && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [additional_properties, properties, required, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_schema_response_settings_field.rb b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_settings_field.rb new file mode 100644 index 00000000000..fbeededa5b4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_settings_field.rb @@ -0,0 +1,156 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON Schema definition for a single field within settings or secrets. + # The exact fields vary by integration. + class WebIntegrationAccountSchemaResponseSettingsField + include BaseGenericModel + + # Whether additional properties are allowed for this field. + attr_accessor :additional_properties + + # Default value for the field if not provided. + attr_accessor :default + + # Human-readable description of the field's purpose. + attr_accessor :description + + # Schema for array items when type is "array". + attr_accessor :items + + # Minimum length for string fields. + attr_accessor :min_length + + # The data type of the field (string, boolean, integer, array, object). + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'additional_properties' => :'additionalProperties', + :'default' => :'default', + :'description' => :'description', + :'items' => :'items', + :'min_length' => :'minLength', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'additional_properties' => :'Boolean', + :'default' => :'Object', + :'description' => :'String', + :'items' => :'Object', + :'min_length' => :'Integer', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountSchemaResponseSettingsField` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'additional_properties') + self.additional_properties = attributes[:'additional_properties'] + end + + if attributes.key?(:'default') + self.default = attributes[:'default'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'items') + self.items = attributes[:'items'] + end + + if attributes.key?(:'min_length') + self.min_length = attributes[:'min_length'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_properties == o.additional_properties && + default == o.default && + description == o.description && + items == o.items && + min_length == o.min_length && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [additional_properties, default, description, items, min_length, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_schema_response_settings_object.rb b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_settings_object.rb new file mode 100644 index 00000000000..b56cd07460a --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_schema_response_settings_object.rb @@ -0,0 +1,140 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON Schema definition for the settings object. + # Contains integration-specific configuration fields such as account identifiers, + # feature toggles, and non-sensitive configuration options. + class WebIntegrationAccountSchemaResponseSettingsObject + include BaseGenericModel + + # Whether additional properties are allowed (typically false). + attr_accessor :additional_properties + + # The individual setting fields for this integration. + # Field names and types vary by integration. + attr_accessor :properties + + # List of required setting field names. + attr_accessor :required + + # Always "object" for the settings container. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'additional_properties' => :'additionalProperties', + :'properties' => :'properties', + :'required' => :'required', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'additional_properties' => :'Boolean', + :'properties' => :'Hash', + :'required' => :'Array', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountSchemaResponseSettingsObject` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'additional_properties') + self.additional_properties = attributes[:'additional_properties'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'required') + if (value = attributes[:'required']).is_a?(Array) + self.required = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_properties == o.additional_properties && + properties == o.properties && + required == o.required && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [additional_properties, properties, required, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_sort.rb b/lib/datadog_api_client/v2/models/web_integration_account_type.rb similarity index 52% rename from lib/datadog_api_client/v2/models/security_monitoring_suppression_sort.rb rename to lib/datadog_api_client/v2/models/web_integration_account_type.rb index ebcf5ce84f5..f7c2e712119 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_sort.rb +++ b/lib/datadog_api_client/v2/models/web_integration_account_type.rb @@ -17,19 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # The sort parameters used for querying suppression rules. - class SecurityMonitoringSuppressionSort + # The JSON:API type for web integration accounts. + class WebIntegrationAccountType include BaseEnumModel - NAME = "name".freeze - START_DATE = "start_date".freeze - EXPIRATION_DATE = "expiration_date".freeze - UPDATE_DATE = "update_date".freeze - ENABLED = "enabled".freeze - NAME_DESCENDING = "-name".freeze - START_DATE_DESCENDING = "-start_date".freeze - EXPIRATION_DATE_DESCENDING = "-expiration_date".freeze - UPDATE_DATE_DESCENDING = "-update_date".freeze - ENABLED_DESCENDING = "-enabled".freeze + ACCOUNT = "Account".freeze end end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_update_request.rb b/lib/datadog_api_client/v2/models/web_integration_account_update_request.rb new file mode 100644 index 00000000000..4e08bb14c42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Payload for updating a web integration account. + class WebIntegrationAccountUpdateRequest + include BaseGenericModel + + # Data object for updating a web integration account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'WebIntegrationAccountUpdateRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_update_request_attributes.rb b/lib/datadog_api_client/v2/models/web_integration_account_update_request_attributes.rb new file mode 100644 index 00000000000..7149d4c8ff8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_update_request_attributes.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for updating a web integration account. All fields are optional - + # only provide the fields you want to update. Partial updates are supported, + # allowing you to modify specific settings or secrets without providing all fields. + class WebIntegrationAccountUpdateRequestAttributes + include BaseGenericModel + + # The name of the account. + attr_accessor :name + + # Sensitive credentials to update. Only the secrets provided will be updated. + # These values are write-only and never returned in responses. + attr_accessor :secrets + + # Integration-specific settings to update. Only the fields provided will be updated. + # The structure varies by integration type. Refer to the integration's schema for available fields. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'secrets' => :'secrets', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'secrets' => :'Hash', + :'settings' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountUpdateRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'secrets') + self.secrets = attributes[:'secrets'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + secrets == o.secrets && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, secrets, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/web_integration_account_update_request_data.rb b/lib/datadog_api_client/v2/models/web_integration_account_update_request_data.rb new file mode 100644 index 00000000000..f035ba84fd3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/web_integration_account_update_request_data.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for updating a web integration account. + class WebIntegrationAccountUpdateRequestData + include BaseGenericModel + + # Attributes for updating a web integration account. All fields are optional - + # only provide the fields you want to update. Partial updates are supported, + # allowing you to modify specific settings or secrets without providing all fields. + attr_accessor :attributes + + # The JSON:API type for web integration accounts. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'WebIntegrationAccountUpdateRequestAttributes', + :'type' => :'WebIntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountUpdateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_paginated_suppressions_response.rb b/lib/datadog_api_client/v2/models/web_integration_accounts_response.rb similarity index 81% rename from lib/datadog_api_client/v2/models/security_monitoring_paginated_suppressions_response.rb rename to lib/datadog_api_client/v2/models/web_integration_accounts_response.rb index 15545aed3c6..32d01a6a2a2 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_paginated_suppressions_response.rb +++ b/lib/datadog_api_client/v2/models/web_integration_accounts_response.rb @@ -17,15 +17,15 @@ require 'time' module DatadogAPIClient::V2 - # Response object containing the available suppression rules with pagination metadata. - class SecurityMonitoringPaginatedSuppressionsResponse + # Response containing a list of web integration accounts. + class WebIntegrationAccountsResponse include BaseGenericModel - # A list of suppressions objects. + # attr_accessor :data - # Metadata for the suppression list response. - attr_accessor :meta + # The name of the integration. + attr_accessor :integration_name attr_accessor :additional_properties @@ -34,7 +34,7 @@ class SecurityMonitoringPaginatedSuppressionsResponse def self.attribute_map { :'data' => :'data', - :'meta' => :'meta' + :'integration_name' => :'integration_name' } end @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array', - :'meta' => :'SecurityMonitoringSuppressionsMeta' + :'data' => :'Array', + :'integration_name' => :'String' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringPaginatedSuppressionsResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WebIntegrationAccountsResponse` initialize method" end self.additional_properties = {} @@ -71,8 +71,8 @@ def initialize(attributes = {}) end end - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] + if attributes.key?(:'integration_name') + self.integration_name = attributes[:'integration_name'] end end @@ -103,7 +103,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data && - meta == o.meta && + integration_name == o.integration_name && additional_properties == o.additional_properties end @@ -111,7 +111,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, meta, additional_properties].hash + [data, integration_name, additional_properties].hash end end end