diff --git a/.apigentools-info b/.apigentools-info index 815a7bf937bb..b50570cffe09 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-16 23:13:36.422161", - "spec_repo_commit": "0ad24d9f" + "regenerated": "2025-01-17 14:24:06.552315", + "spec_repo_commit": "60205e12" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-16 23:13:36.437885", - "spec_repo_commit": "0ad24d9f" + "regenerated": "2025-01-17 14:24:06.567593", + "spec_repo_commit": "60205e12" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 763dc8027794..c0f7b54f032f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -206,6 +206,13 @@ components: required: true schema: type: string + ConnectionId: + description: The ID of the action connection + in: path + name: connection_id + required: true + schema: + type: string CustomDestinationId: description: The ID of the custom destination. in: path @@ -1210,6 +1217,64 @@ components: required: - data type: object + AWSAssumeRole: + description: The definition of `AWSAssumeRole` object. + properties: + account_id: + description: AWS account the connection is created for + example: '111222333444' + pattern: ^\d{12}$ + type: string + external_id: + description: External ID used to scope which connection can be used to assume + the role + example: 33a1011635c44b38a064cf14e82e1d8f + readOnly: true + type: string + principal_id: + description: AWS account that will assume the role + example: '123456789012' + readOnly: true + type: string + role: + description: Role to assume + example: my-role + type: string + type: + $ref: '#/components/schemas/AWSAssumeRoleType' + required: + - type + - account_id + - role + type: object + AWSAssumeRoleType: + description: The definition of `AWSAssumeRoleType` object. + enum: + - AWSAssumeRole + example: AWSAssumeRole + type: string + x-enum-varnames: + - AWSASSUMEROLE + AWSAssumeRoleUpdate: + description: The definition of `AWSAssumeRoleUpdate` object. + properties: + account_id: + description: AWS account the connection is created for + example: '111222333444' + pattern: ^\d{12}$ + type: string + generate_new_external_id: + description: The `AWSAssumeRoleUpdate` `generate_new_external_id`. + type: boolean + role: + description: Role to assume + example: my-role + type: string + type: + $ref: '#/components/schemas/AWSAssumeRoleType' + required: + - type + type: object AWSAuthConfig: description: AWS Authentication config. oneOf: @@ -1248,6 +1313,43 @@ components: required: - role_name type: object + AWSCredentials: + description: The definition of `AWSCredentials` object. + oneOf: + - $ref: '#/components/schemas/AWSAssumeRole' + AWSCredentialsUpdate: + description: The definition of `AWSCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/AWSAssumeRoleUpdate' + AWSIntegration: + description: The definition of `AWSIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/AWSCredentials' + type: + $ref: '#/components/schemas/AWSIntegrationType' + required: + - type + - credentials + type: object + AWSIntegrationType: + description: The definition of `AWSIntegrationType` object. + enum: + - AWS + example: AWS + type: string + x-enum-varnames: + - AWS + AWSIntegrationUpdate: + description: The definition of `AWSIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/AWSCredentialsUpdate' + type: + $ref: '#/components/schemas/AWSIntegrationType' + required: + - type + type: object AWSLambdaForwarderConfig: description: 'Log Autosubscription configuration for Datadog Forwarder Lambda functions. Automatically set up triggers for existing @@ -1561,6 +1663,73 @@ components: xray_services: $ref: '#/components/schemas/XRayServicesList' type: object + ActionConnectionAttributes: + description: The definition of `ActionConnectionAttributes` object. + properties: + integration: + $ref: '#/components/schemas/ActionConnectionIntegration' + name: + description: Name of the connection + example: My AWS Connection + type: string + required: + - name + - integration + type: object + ActionConnectionAttributesUpdate: + description: The definition of `ActionConnectionAttributesUpdate` object. + properties: + integration: + $ref: '#/components/schemas/ActionConnectionIntegrationUpdate' + name: + description: Name of the connection + example: My AWS Connection + type: string + type: object + ActionConnectionData: + description: Data related to the connection. + properties: + attributes: + $ref: '#/components/schemas/ActionConnectionAttributes' + id: + description: The connection identifier + readOnly: true + type: string + type: + $ref: '#/components/schemas/ActionConnectionDataType' + required: + - type + - attributes + type: object + ActionConnectionDataType: + description: The definition of `ActionConnectionDataType` object. + enum: + - action_connection + example: action_connection + type: string + x-enum-varnames: + - ACTION_CONNECTION + ActionConnectionDataUpdate: + description: Data related to the connection update. + properties: + attributes: + $ref: '#/components/schemas/ActionConnectionAttributesUpdate' + type: + $ref: '#/components/schemas/ActionConnectionDataType' + required: + - type + - attributes + type: object + ActionConnectionIntegration: + description: The definition of `ActionConnectionIntegration` object. + oneOf: + - $ref: '#/components/schemas/AWSIntegration' + - $ref: '#/components/schemas/HTTPIntegration' + ActionConnectionIntegrationUpdate: + description: The definition of `ActionConnectionIntegrationUpdate` object. + oneOf: + - $ref: '#/components/schemas/AWSIntegrationUpdate' + - $ref: '#/components/schemas/HTTPIntegrationUpdate' ActiveBillingDimensionsAttributes: description: List of active billing dimensions. properties: @@ -7020,6 +7189,20 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CreateActionConnectionRequest: + description: Request used to create an action connection. + properties: + data: + $ref: '#/components/schemas/ActionConnectionData' + required: + - data + type: object + CreateActionConnectionResponse: + description: The response for a created connection + properties: + data: + $ref: '#/components/schemas/ActionConnectionData' + type: object CreateAppRequest: description: The definition of `CreateAppRequest` object. example: @@ -12230,6 +12413,12 @@ components: type: string x-enum-varnames: - GCP_SERVICE_ACCOUNT + GetActionConnectionResponse: + description: The response for found connection + properties: + data: + $ref: '#/components/schemas/ActionConnectionData' + type: object GetAppResponse: description: The definition of `GetAppResponse` object. properties: @@ -12524,6 +12713,18 @@ components: example: env:production type: string type: array + HTTPBody: + description: The definition of `HTTPBody` object. + properties: + content: + description: Serialized body content + example: '{"some-json": "with-value"}' + type: string + content_type: + description: Content type of the body + example: application/json + type: string + type: object HTTPCIAppError: description: List of errors. properties: @@ -12549,6 +12750,88 @@ components: $ref: '#/components/schemas/HTTPCIAppError' type: array type: object + HTTPCredentials: + description: The definition of `HTTPCredentials` object. + oneOf: + - $ref: '#/components/schemas/HTTPTokenAuth' + HTTPCredentialsUpdate: + description: The definition of `HTTPCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/HTTPTokenAuthUpdate' + HTTPHeader: + description: The definition of `HTTPHeader` object. + properties: + name: + description: The `HTTPHeader` `name`. + example: MyHttpHeader + pattern: ^[A-Za-z][A-Za-z\\d\\-\\_]*$ + type: string + value: + description: The `HTTPHeader` `value`. + example: Some header value + type: string + required: + - name + - value + type: object + HTTPHeaderUpdate: + description: The definition of `HTTPHeaderUpdate` object. + properties: + deleted: + description: Should the header be deleted. + type: boolean + name: + description: The `HTTPHeaderUpdate` `name`. + example: MyHttpHeader + pattern: ^[A-Za-z][A-Za-z\\d\\-\\_]*$ + type: string + value: + description: The `HTTPHeaderUpdate` `value`. + example: Updated Header Value + type: string + required: + - name + type: object + HTTPIntegration: + description: The definition of `HTTPIntegration` object. + properties: + base_url: + description: Base HTTP url for the integration + example: http://datadoghq.com + pattern: url + type: string + credentials: + $ref: '#/components/schemas/HTTPCredentials' + type: + $ref: '#/components/schemas/HTTPIntegrationType' + required: + - type + - base_url + - credentials + type: object + HTTPIntegrationType: + description: The definition of `HTTPIntegrationType` object. + enum: + - HTTP + example: HTTP + type: string + x-enum-varnames: + - HTTP + HTTPIntegrationUpdate: + description: The definition of `HTTPIntegrationUpdate` object. + properties: + base_url: + description: Base HTTP url for the integration + example: http://datadoghq.com + pattern: url + type: string + credentials: + $ref: '#/components/schemas/HTTPCredentialsUpdate' + type: + $ref: '#/components/schemas/HTTPIntegrationType' + required: + - type + type: object HTTPLog: description: Structured log message. items: @@ -12625,6 +12908,105 @@ components: required: - message type: object + HTTPToken: + description: The definition of `HTTPToken` object. + properties: + name: + description: The `HTTPToken` `name`. + example: MyToken + pattern: ^[A-Za-z][A-Za-z\\d]*$ + type: string + type: + $ref: '#/components/schemas/TokenType' + value: + description: The `HTTPToken` `value`. + example: Some Token Value + type: string + required: + - name + - value + - type + type: object + HTTPTokenAuth: + description: The definition of `HTTPTokenAuth` object. + properties: + body: + $ref: '#/components/schemas/HTTPBody' + headers: + description: The `HTTPTokenAuth` `headers`. + items: + $ref: '#/components/schemas/HTTPHeader' + type: array + tokens: + description: The `HTTPTokenAuth` `tokens`. + items: + $ref: '#/components/schemas/HTTPToken' + type: array + type: + $ref: '#/components/schemas/HTTPTokenAuthType' + url_parameters: + description: The `HTTPTokenAuth` `url_parameters`. + items: + $ref: '#/components/schemas/UrlParam' + type: array + required: + - type + type: object + HTTPTokenAuthType: + description: The definition of `HTTPTokenAuthType` object. + enum: + - HTTPTokenAuth + example: HTTPTokenAuth + type: string + x-enum-varnames: + - HTTPTOKENAUTH + HTTPTokenAuthUpdate: + description: The definition of `HTTPTokenAuthUpdate` object. + properties: + body: + $ref: '#/components/schemas/HTTPBody' + headers: + description: The `HTTPTokenAuthUpdate` `headers`. + items: + $ref: '#/components/schemas/HTTPHeaderUpdate' + type: array + tokens: + description: The `HTTPTokenAuthUpdate` `tokens`. + items: + $ref: '#/components/schemas/HTTPTokenUpdate' + type: array + type: + $ref: '#/components/schemas/HTTPTokenAuthType' + url_parameters: + description: The `HTTPTokenAuthUpdate` `url_parameters`. + items: + $ref: '#/components/schemas/UrlParamUpdate' + type: array + required: + - type + type: object + HTTPTokenUpdate: + description: The definition of `HTTPTokenUpdate` object. + properties: + deleted: + description: Should the header be deleted. + type: boolean + name: + description: The `HTTPToken` `name`. + example: MyToken + pattern: ^[A-Za-z][A-Za-z\\d]*$ + type: string + type: + $ref: '#/components/schemas/TokenType' + value: + description: The `HTTPToken` `value`. + example: Some Token Value + type: string + required: + - name + - type + - value + type: object HistoricalJobDataType: description: Type of payload. enum: @@ -28735,6 +29117,19 @@ components: items: $ref: '#/components/schemas/TimeseriesResponseValues' type: array + TokenName: + description: Name for tokens. + example: MyTokenName + pattern: ^[A-Za-z][A-Za-z\\d]*$ + type: string + TokenType: + description: The definition of `TokenType` object. + enum: + - SECRET + example: SECRET + type: string + x-enum-varnames: + - SECRET Unit: description: Object containing the metric unit family, scale factor, name, and short name. @@ -28763,6 +29158,20 @@ components: example: min type: string type: object + UpdateActionConnectionRequest: + description: Request used to update an action connection. + properties: + data: + $ref: '#/components/schemas/ActionConnectionDataUpdate' + required: + - data + type: object + UpdateActionConnectionResponse: + description: The response for an updated connection. + properties: + data: + $ref: '#/components/schemas/ActionConnectionData' + type: object UpdateAppRequest: description: The definition of `UpdateAppRequest` object. example: @@ -29033,6 +29442,36 @@ components: description: Upsert entity response included item. oneOf: - $ref: '#/components/schemas/EntityResponseIncludedSchema' + UrlParam: + description: The definition of `UrlParam` object. + properties: + name: + $ref: '#/components/schemas/TokenName' + example: MyUrlParameter + value: + description: The `UrlParam` `value`. + example: Some Url Parameter value + type: string + required: + - name + - value + type: object + UrlParamUpdate: + description: The definition of `UrlParamUpdate` object. + properties: + deleted: + description: Should the header be deleted. + type: boolean + name: + $ref: '#/components/schemas/TokenName' + example: MyUrlParameter + value: + description: The `UrlParamUpdate` `value`. + example: Some Url Parameter value + type: string + required: + - name + type: object UsageApplicationSecurityMonitoringResponse: description: Application Security Monitoring usage response. properties: @@ -30274,6 +30713,163 @@ info: version: '1.0' openapi: 3.0.0 paths: + /api/v2/actions/connections: + post: + description: Create a new Action Connection + operationId: CreateActionConnection + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateActionConnectionRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateActionConnectionResponse' + description: Successfully created Action Connection + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Too Many Request + summary: Create a new Action Connection + tags: + - Action Connection + /api/v2/actions/connections/{connection_id}: + delete: + description: Delete an existing Action Connection + operationId: DeleteActionConnection + parameters: + - $ref: '#/components/parameters/ConnectionId' + responses: + '204': + description: The resource was deleted successfully. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Too Many Request + summary: Delete an existing Action Connection + tags: + - Action Connection + x-permission: + operator: OR + permissions: + - connection_write + get: + description: Get an existing Action Connection + operationId: GetActionConnection + parameters: + - $ref: '#/components/parameters/ConnectionId' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetActionConnectionResponse' + description: Successfully get Action Connection + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Too Many Request + summary: Get an existing Action Connection + tags: + - Action Connection + patch: + description: Update an existing Action Connection + operationId: UpdateActionConnection + parameters: + - $ref: '#/components/parameters/ConnectionId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateActionConnectionRequest' + description: Update an existing Action Connection request body + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateActionConnectionResponse' + description: Successfully updated Action Connection + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Too Many Request + summary: Update an existing Action Connection + tags: + - Action Connection /api/v2/agentless_scanning/accounts/aws: get: description: Fetches the scan options configured for AWS accounts. @@ -48218,6 +48814,17 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection name: AWS Logs Integration +- description: "Action connections extend your installed integrations and allow you + to take action in your third-party systems\n(e.g. AWS, GitLab, and Statuspage) + with Datadog\u2019s Workflow Automation and App Builder products.\n\nDatadog\u2019s + Integrations automatically provide authentication for Slack, Microsoft Teams, + PagerDuty, Opsgenie,\nJIRA, GitHub, and Statuspage. You do not need additional + connections in order to access these tools within\nWorkflow Automation and App + Builder.\n\nWe offer granular access control for editing and resolving connections." + externalDocs: + description: Find out more at + url: https://docs.datadoghq.com/service_management/workflows/connections/ + name: Action Connection - description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin your hosts, running containers, and serverless functions\u2014all without\nrequiring teams to install Agents on every host or where Agents cannot be installed.\nGo diff --git a/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Bad-Request-response_1450134238/frozen.json b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Bad-Request-response_1450134238/frozen.json new file mode 100644 index 000000000000..8c1a31f41efe --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Bad-Request-response_1450134238/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:35.383Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Bad-Request-response_1450134238/recording.har b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Bad-Request-response_1450134238/recording.har new file mode 100644 index 000000000000..1ae9b77e262c --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Bad-Request-response_1450134238/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Action Connection/Create a new Action Connection returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "156f17e1fd06950e6f22ae3663d66d0a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 189, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"1\",\"role\":\"MyRoleUpdated\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection\"},\"type\":\"action_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections" + }, + "response": { + "bodySize": 566, + "content": { + "mimeType": "application/vnd.api+json", + "size": 566, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error creating connection: rpc error: code = InvalidArgument desc = multiple errors: 1 error occurred:\\n\\t* [error_code=8]: invalid CreateCustomConnectionRequest.Data: embedded message failed validation | caused by: invalid CustomConnectionData.Aws: embedded message failed validation | caused by: invalid CustomConnectionData_AwsAuthData.AssumeRole: embedded message failed validation | caused by: invalid CustomConnectionData_AwsAuthData_AssumeRole.AccountId: value does not match regex pattern \\\"^\\\\\\\\d{12}$\\\"\\n\\n\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-01-06T22:02:35.391Z", + "time": 195 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Successfully-created-Action-Connection-response_1033790161/frozen.json b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Successfully-created-Action-Connection-response_1033790161/frozen.json new file mode 100644 index 000000000000..f5f275fe0f41 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Successfully-created-Action-Connection-response_1033790161/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:35.598Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Successfully-created-Action-Connection-response_1033790161/recording.har b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Successfully-created-Action-Connection-response_1033790161/recording.har new file mode 100644 index 000000000000..2ee9526e3e0a --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Create-a-new-Action-Connection-returns-Successfully-created-Action-Connection-response_1033790161/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Action Connection/Create a new Action Connection returns \"Successfully created Action Connection\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "143d1c356301e638823fd266922b4a2b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 210, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection DELETE_ME\"},\"type\":\"action_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections" + }, + "response": { + "bodySize": 333, + "content": { + "mimeType": "application/vnd.api+json", + "size": 333, + "text": "{\"data\":{\"id\":\"db41b6cb-ef93-45bd-9857-548e9474737c\",\"type\":\"action_connection\",\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"external_id\":\"c6f62d439f14423b963e4dd4246af4a7\",\"principal_id\":\"464622532012\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection DELETE_ME\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-01-06T22:02:35.602Z", + "time": 599 + }, + { + "_id": "bf4a679205b2404713abb319f5aac56c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/db41b6cb-ef93-45bd-9857-548e9474737c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-01-06T22:02:36.212Z", + "time": 245 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Not-Found-response_1976734023/frozen.json b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Not-Found-response_1976734023/frozen.json new file mode 100644 index 000000000000..1e10f1bceb4c --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Not-Found-response_1976734023/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:36.467Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Not-Found-response_1976734023/recording.har b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Not-Found-response_1976734023/recording.har new file mode 100644 index 000000000000..db20195632a8 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Not-Found-response_1976734023/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Action Connection/Delete an existing Action Connection returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "73a4792d4a7dc5b0e6c576a0bf44ef1f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/aaa11111-aa11-aa11-aaaa-aaaaaa111111" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error deleting connection: rpc error: code = NotFound desc = connection not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-01-06T22:02:36.471Z", + "time": 154 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Successfully-deleted-Action-Connection-respo_2516467850/frozen.json b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Successfully-deleted-Action-Connection-respo_2516467850/frozen.json new file mode 100644 index 000000000000..45f581f8eb69 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Successfully-deleted-Action-Connection-respo_2516467850/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:36.636Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Successfully-deleted-Action-Connection-respo_2516467850/recording.har b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Successfully-deleted-Action-Connection-respo_2516467850/recording.har new file mode 100644 index 000000000000..abadb07afb0b --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Delete-an-existing-Action-Connection-returns-Successfully-deleted-Action-Connection-respo_2516467850/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Action Connection/Delete an existing Action Connection returns \"Successfully deleted Action Connection\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "ec83dd5ca79f6fd8cf51506c9ca781ba", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 200, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRole\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection DELETE\"},\"type\":\"action_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections" + }, + "response": { + "bodySize": 323, + "content": { + "mimeType": "application/vnd.api+json", + "size": 323, + "text": "{\"data\":{\"id\":\"4b60345a-85b2-4417-94b2-72a9528b4060\",\"type\":\"action_connection\",\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRole\",\"external_id\":\"3bceadebe70c4df7b8ec6abb789e08c0\",\"principal_id\":\"464622532012\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection DELETE\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-01-06T22:02:36.641Z", + "time": 545 + }, + { + "_id": "6d1bb661093ae61ec9555699a74e9279", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/4b60345a-85b2-4417-94b2-72a9528b4060" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-01-06T22:02:37.195Z", + "time": 103 + }, + { + "_id": "6d1bb661093ae61ec9555699a74e9279", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/4b60345a-85b2-4417-94b2-72a9528b4060" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error deleting connection: rpc error: code = NotFound desc = connection not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-01-06T22:02:37.305Z", + "time": 87 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Bad-Request-response_416393223/frozen.json b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Bad-Request-response_416393223/frozen.json new file mode 100644 index 000000000000..57a2621ae179 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Bad-Request-response_416393223/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:37.403Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Bad-Request-response_416393223/recording.har b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Bad-Request-response_416393223/recording.har new file mode 100644 index 000000000000..f4dae6477eb8 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Bad-Request-response_416393223/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Action Connection/Get an existing Action Connection returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "8123f3afec14068c253a39eb8f53c084", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 528, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/bad-format" + }, + "response": { + "bodySize": 85, + "content": { + "mimeType": "application/vnd.api+json", + "size": 85, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error connectionId not a valid UUID\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-01-06T22:02:37.406Z", + "time": 148 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Not-Found-response_2690146528/frozen.json b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Not-Found-response_2690146528/frozen.json new file mode 100644 index 000000000000..ba994fa9d8a0 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Not-Found-response_2690146528/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:37.563Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Not-Found-response_2690146528/recording.har b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Not-Found-response_2690146528/recording.har new file mode 100644 index 000000000000..a02074604054 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Not-Found-response_2690146528/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Action Connection/Get an existing Action Connection returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "ec39c262bc27539eb2713eaecd67d11e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 554, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/aaa11111-aa11-aa11-aaaa-aaaaaa111111" + }, + "response": { + "bodySize": 130, + "content": { + "mimeType": "application/vnd.api+json", + "size": 130, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error getting connection: rpc error: code = NotFound desc = connection not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-01-06T22:02:37.568Z", + "time": 165 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Successfully-get-Action-Connection-response_3220569486/frozen.json b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Successfully-get-Action-Connection-response_3220569486/frozen.json new file mode 100644 index 000000000000..7c5d79008d0d --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Successfully-get-Action-Connection-response_3220569486/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:37.743Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Successfully-get-Action-Connection-response_3220569486/recording.har b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Successfully-get-Action-Connection-response_3220569486/recording.har new file mode 100644 index 000000000000..54ef8517bb02 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Get-an-existing-Action-Connection-returns-Successfully-get-Action-Connection-response_3220569486/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Action Connection/Get an existing Action Connection returns \"Successfully get Action Connection\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "da039dfbc5ce393fca5e2efe2618adfb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 554, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/cb460d51-3c88-4e87-adac-d47131d0423d" + }, + "response": { + "bodySize": 323, + "content": { + "mimeType": "application/vnd.api+json", + "size": 323, + "text": "{\"data\":{\"id\":\"cb460d51-3c88-4e87-adac-d47131d0423d\",\"type\":\"action_connection\",\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"external_id\":\"909b33b1242748cfbef42f20011e2fa0\",\"principal_id\":\"464622532012\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-01-06T22:02:37.748Z", + "time": 242 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Bad-Request-response_489389638/frozen.json b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Bad-Request-response_489389638/frozen.json new file mode 100644 index 000000000000..6d21ddb7fc4b --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Bad-Request-response_489389638/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:38.001Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Bad-Request-response_489389638/recording.har b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Bad-Request-response_489389638/recording.har new file mode 100644 index 000000000000..2befde73c149 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Bad-Request-response_489389638/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Action Connection/Update an existing Action Connection returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "a5f930b0ef1e06ab26b3a7298f5f18d8", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 189, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 612, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"1\",\"role\":\"MyRoleUpdated\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection\"},\"type\":\"action_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/cb460d51-3c88-4e87-adac-d47131d0423d" + }, + "response": { + "bodySize": 582, + "content": { + "mimeType": "application/vnd.api+json", + "size": 582, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error creating connection: rpc error: code = InvalidArgument desc = multiple errors: 1 error occurred:\\n\\t* [error_code=8]: invalid UpdateCustomConnectionRequest.DataUpdate: embedded message failed validation | caused by: invalid CustomConnectionDataUpdate.Aws: embedded message failed validation | caused by: invalid CustomConnectionDataUpdate_AwsAuth.AssumeRole: embedded message failed validation | caused by: invalid CustomConnectionDataUpdate_AwsAuth_AssumeRole.AccountId: value does not match regex pattern \\\"^\\\\\\\\d{12}$\\\"\\n\\n\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-01-06T22:02:38.004Z", + "time": 84 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Not-Found-response_4091046797/frozen.json b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Not-Found-response_4091046797/frozen.json new file mode 100644 index 000000000000..814d17d2ba70 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Not-Found-response_4091046797/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:38.092Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Not-Found-response_4091046797/recording.har b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Not-Found-response_4091046797/recording.har new file mode 100644 index 000000000000..3642126ca43f --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Not-Found-response_4091046797/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Action Connection/Update an existing Action Connection returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "6f63be26588a90a0ac45ac23631657d6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 200, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 612, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection\"},\"type\":\"action_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/aaa11111-aa11-aa11-aaaa-aaaaaa111111" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error creating connection: rpc error: code = NotFound desc = connection not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-01-06T22:02:38.094Z", + "time": 86 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Successfully-updated-Action-Connection-respo_1978636210/frozen.json b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Successfully-updated-Action-Connection-respo_1978636210/frozen.json new file mode 100644 index 000000000000..cde56b9ae096 --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Successfully-updated-Action-Connection-respo_1978636210/frozen.json @@ -0,0 +1 @@ +"2025-01-06T22:02:38.186Z" diff --git a/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Successfully-updated-Action-Connection-respo_1978636210/recording.har b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Successfully-updated-Action-Connection-respo_1978636210/recording.har new file mode 100644 index 000000000000..c22fba275bdc --- /dev/null +++ b/cassettes/v2/Action-Connection_2186802177/Update-an-existing-Action-Connection-returns-Successfully-updated-Action-Connection-respo_1978636210/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Action Connection/Update an existing Action Connection returns \"Successfully updated Action Connection\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "cf560806a32fedb9ab5d5ce5fc16eaf5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 200, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 612, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection\"},\"type\":\"action_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/actions/connections/cb460d51-3c88-4e87-adac-d47131d0423d" + }, + "response": { + "bodySize": 323, + "content": { + "mimeType": "application/vnd.api+json", + "size": 323, + "text": "{\"data\":{\"id\":\"cb460d51-3c88-4e87-adac-d47131d0423d\",\"type\":\"action_connection\",\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"external_id\":\"909b33b1242748cfbef42f20011e2fa0\",\"principal_id\":\"464622532012\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 666, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-01-06T22:02:38.188Z", + "time": 445 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/action-connection/CreateActionConnection.ts b/examples/v2/action-connection/CreateActionConnection.ts new file mode 100644 index 000000000000..8d6a74944f97 --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection.ts @@ -0,0 +1,36 @@ +/** + * Create a new Action Connection returns "Successfully created Action Connection" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ActionConnectionApi(configuration); + +const params: v2.ActionConnectionApiCreateActionConnectionRequest = { + body: { + data: { + type: "action_connection", + attributes: { + name: "Cassette Connection DELETE_ME", + integration: { + type: "AWS", + credentials: { + type: "AWSAssumeRole", + role: "MyRoleUpdated", + accountId: "123456789123", + }, + }, + }, + }, + }, +}; + +apiInstance + .createActionConnection(params) + .then((data: v2.CreateActionConnectionResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/action-connection/DeleteActionConnection.ts b/examples/v2/action-connection/DeleteActionConnection.ts new file mode 100644 index 000000000000..67a3517fa321 --- /dev/null +++ b/examples/v2/action-connection/DeleteActionConnection.ts @@ -0,0 +1,21 @@ +/** + * Delete an existing Action Connection returns "The resource was deleted successfully." response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ActionConnectionApi(configuration); + +const params: v2.ActionConnectionApiDeleteActionConnectionRequest = { + connectionId: "connection_id", +}; + +apiInstance + .deleteActionConnection(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/action-connection/DeleteActionConnection_2142905164.ts b/examples/v2/action-connection/DeleteActionConnection_2142905164.ts new file mode 100644 index 000000000000..f000b4fc5500 --- /dev/null +++ b/examples/v2/action-connection/DeleteActionConnection_2142905164.ts @@ -0,0 +1,25 @@ +/** + * Delete an existing Action Connection returns "Successfully deleted Action Connection" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ActionConnectionApi(configuration); + +// there is a valid "action_connection" in the system +const ACTION_CONNECTION_DATA_ID = process.env + .ACTION_CONNECTION_DATA_ID as string; + +const params: v2.ActionConnectionApiDeleteActionConnectionRequest = { + connectionId: ACTION_CONNECTION_DATA_ID, +}; + +apiInstance + .deleteActionConnection(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/action-connection/GetActionConnection.ts b/examples/v2/action-connection/GetActionConnection.ts new file mode 100644 index 000000000000..2643345d06e5 --- /dev/null +++ b/examples/v2/action-connection/GetActionConnection.ts @@ -0,0 +1,21 @@ +/** + * Get an existing Action Connection returns "Successfully get Action Connection" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ActionConnectionApi(configuration); + +const params: v2.ActionConnectionApiGetActionConnectionRequest = { + connectionId: "cb460d51-3c88-4e87-adac-d47131d0423d", +}; + +apiInstance + .getActionConnection(params) + .then((data: v2.GetActionConnectionResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/action-connection/UpdateActionConnection.ts b/examples/v2/action-connection/UpdateActionConnection.ts new file mode 100644 index 000000000000..c034f6834183 --- /dev/null +++ b/examples/v2/action-connection/UpdateActionConnection.ts @@ -0,0 +1,37 @@ +/** + * Update an existing Action Connection returns "Successfully updated Action Connection" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.ActionConnectionApi(configuration); + +const params: v2.ActionConnectionApiUpdateActionConnectionRequest = { + body: { + data: { + type: "action_connection", + attributes: { + name: "Cassette Connection", + integration: { + type: "AWS", + credentials: { + type: "AWSAssumeRole", + role: "MyRoleUpdated", + accountId: "123456789123", + }, + }, + }, + }, + }, + connectionId: "cb460d51-3c88-4e87-adac-d47131d0423d", +}; + +apiInstance + .updateActionConnection(params) + .then((data: v2.UpdateActionConnectionResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 8f8294e34508..ba2a4464192c 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -2306,6 +2306,38 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { "v1.Validate": { "operationResponseType": "AuthenticationValidationResponse", }, + "v2.CreateActionConnection": { + "body": { + "type": "CreateActionConnectionRequest", + "format": "", + }, + "operationResponseType": "CreateActionConnectionResponse", + }, + "v2.DeleteActionConnection": { + "connectionId": { + "type": "string", + "format": "", + }, + "operationResponseType": "void", + }, + "v2.GetActionConnection": { + "connectionId": { + "type": "string", + "format": "", + }, + "operationResponseType": "GetActionConnectionResponse", + }, + "v2.UpdateActionConnection": { + "connectionId": { + "type": "string", + "format": "", + }, + "body": { + "type": "UpdateActionConnectionRequest", + "format": "", + }, + "operationResponseType": "UpdateActionConnectionResponse", + }, "v2.ListAwsScanOptions": { "operationResponseType": "AwsScanOptionsResponse", }, diff --git a/features/v2/action_connection.feature b/features/v2/action_connection.feature new file mode 100644 index 000000000000..f379fc1a003e --- /dev/null +++ b/features/v2/action_connection.feature @@ -0,0 +1,96 @@ +@endpoint(action-connection) @endpoint(action-connection-v2) +Feature: Action Connection + Action connections extend your installed integrations and allow you to + take action in your third-party systems (e.g. AWS, GitLab, and Statuspage) + with Datadog’s Workflow Automation and App Builder products. Datadog’s + Integrations automatically provide authentication for Slack, Microsoft + Teams, PagerDuty, Opsgenie, JIRA, GitHub, and Statuspage. You do not need + additional connections in order to access these tools within Workflow + Automation and App Builder. We offer granular access control for editing + and resolving connections. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ActionConnection" API + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection returns "Bad Request" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"1"}}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection returns "Successfully created Action Connection" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection DELETE_ME","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}} + When the request is sent + Then the response status is 201 Successfully created Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Delete an existing Action Connection returns "Not Found" response + Given new "DeleteActionConnection" request + And request contains "connection_id" parameter with value "aaa11111-aa11-aa11-aaaa-aaaaaa111111" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/workflow-automation-dev + Scenario: Delete an existing Action Connection returns "Successfully deleted Action Connection" response + Given there is a valid "action_connection" in the system + And new "DeleteActionConnection" request + And request contains "connection_id" parameter from "action_connection.data.id" + When the request is sent + Then the response status is 204 The resource was deleted successfully. + + @generated @skip @team:DataDog/workflow-automation-dev + Scenario: Delete an existing Action Connection returns "The resource was deleted successfully." response + Given new "DeleteActionConnection" request + And request contains "connection_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 The resource was deleted successfully. + + @team:DataDog/workflow-automation-dev + Scenario: Get an existing Action Connection returns "Bad Request" response + Given new "GetActionConnection" request + And request contains "connection_id" parameter with value "bad-format" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/workflow-automation-dev + Scenario: Get an existing Action Connection returns "Not Found" response + Given new "GetActionConnection" request + And request contains "connection_id" parameter with value "aaa11111-aa11-aa11-aaaa-aaaaaa111111" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/workflow-automation-dev + Scenario: Get an existing Action Connection returns "Successfully get Action Connection" response + Given new "GetActionConnection" request + And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" + When the request is sent + Then the response status is 200 Successfully get Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Update an existing Action Connection returns "Bad Request" response + Given new "UpdateActionConnection" request + And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" + And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"1"}}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/workflow-automation-dev + Scenario: Update an existing Action Connection returns "Not Found" response + Given new "UpdateActionConnection" request + And request contains "connection_id" parameter with value "aaa11111-aa11-aa11-aaaa-aaaaaa111111" + And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/workflow-automation-dev + Scenario: Update an existing Action Connection returns "Successfully updated Action Connection" response + Given new "UpdateActionConnection" request + And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" + And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}} + When the request is sent + Then the response status is 200 Successfully updated Action Connection diff --git a/features/v2/given.json b/features/v2/given.json index 3c9e4279380a..2af5f560d204 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1,4 +1,16 @@ [ + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"action_connection\",\n \"attributes\": {\n \"name\": \"Cassette Connection DELETE\",\n \"integration\": {\n \"type\": \"AWS\",\n \"credentials\": {\n \"type\": \"AWSAssumeRole\",\n \"role\": \"MyRole\",\n \"account_id\": \"123456789123\"\n }\n }\n }\n }\n}" + } + ], + "step": "there is a valid \"action_connection\" in the system", + "key": "action_connection", + "tag": "Action Connection", + "operationId": "CreateActionConnection" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index d6c6e9de87c6..d1258a8d92cb 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1,4 +1,35 @@ { + "CreateActionConnection": { + "tag": "Action Connection", + "undo": { + "operationId": "DeleteActionConnection", + "parameters": [ + { + "name": "connection_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteActionConnection": { + "tag": "Action Connection", + "undo": { + "type": "idempotent" + } + }, + "GetActionConnection": { + "tag": "Action Connection", + "undo": { + "type": "safe" + } + }, + "UpdateActionConnection": { + "tag": "Action Connection", + "undo": { + "type": "idempotent" + } + }, "ListAwsScanOptions": { "tag": "Agentless Scanning", "undo": { diff --git a/packages/datadog-api-client-v2/apis/ActionConnectionApi.ts b/packages/datadog-api-client-v2/apis/ActionConnectionApi.ts new file mode 100644 index 000000000000..83e09e46b2a0 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/ActionConnectionApi.ts @@ -0,0 +1,582 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { CreateActionConnectionRequest } from "../models/CreateActionConnectionRequest"; +import { CreateActionConnectionResponse } from "../models/CreateActionConnectionResponse"; +import { GetActionConnectionResponse } from "../models/GetActionConnectionResponse"; +import { JSONAPIErrorResponse } from "../models/JSONAPIErrorResponse"; +import { UpdateActionConnectionRequest } from "../models/UpdateActionConnectionRequest"; +import { UpdateActionConnectionResponse } from "../models/UpdateActionConnectionResponse"; + +export class ActionConnectionApiRequestFactory extends BaseAPIRequestFactory { + public async createActionConnection( + body: CreateActionConnectionRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createActionConnection"); + } + + // Path Params + const localVarPath = "/api/v2/actions/connections"; + + // Make Request Context + const requestContext = _config + .getServer("v2.ActionConnectionApi.createActionConnection") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CreateActionConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteActionConnection( + connectionId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'connectionId' is not null or undefined + if (connectionId === null || connectionId === undefined) { + throw new RequiredError("connectionId", "deleteActionConnection"); + } + + // Path Params + const localVarPath = "/api/v2/actions/connections/{connection_id}".replace( + "{connection_id}", + encodeURIComponent(String(connectionId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.ActionConnectionApi.deleteActionConnection") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getActionConnection( + connectionId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'connectionId' is not null or undefined + if (connectionId === null || connectionId === undefined) { + throw new RequiredError("connectionId", "getActionConnection"); + } + + // Path Params + const localVarPath = "/api/v2/actions/connections/{connection_id}".replace( + "{connection_id}", + encodeURIComponent(String(connectionId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.ActionConnectionApi.getActionConnection") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateActionConnection( + connectionId: string, + body: UpdateActionConnectionRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'connectionId' is not null or undefined + if (connectionId === null || connectionId === undefined) { + throw new RequiredError("connectionId", "updateActionConnection"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateActionConnection"); + } + + // Path Params + const localVarPath = "/api/v2/actions/connections/{connection_id}".replace( + "{connection_id}", + encodeURIComponent(String(connectionId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.ActionConnectionApi.updateActionConnection") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "UpdateActionConnectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class ActionConnectionApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createActionConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async createActionConnection( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: CreateActionConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateActionConnectionResponse" + ) as CreateActionConnectionResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateActionConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateActionConnectionResponse", + "" + ) as CreateActionConnectionResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteActionConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteActionConnection( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", + "" + ) as void; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getActionConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async getActionConnection( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: GetActionConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetActionConnectionResponse" + ) as GetActionConnectionResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetActionConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetActionConnectionResponse", + "" + ) as GetActionConnectionResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateActionConnection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateActionConnection( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: UpdateActionConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UpdateActionConnectionResponse" + ) as UpdateActionConnectionResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: UpdateActionConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UpdateActionConnectionResponse", + "" + ) as UpdateActionConnectionResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface ActionConnectionApiCreateActionConnectionRequest { + /** + * @type CreateActionConnectionRequest + */ + body: CreateActionConnectionRequest; +} + +export interface ActionConnectionApiDeleteActionConnectionRequest { + /** + * The ID of the action connection + * @type string + */ + connectionId: string; +} + +export interface ActionConnectionApiGetActionConnectionRequest { + /** + * The ID of the action connection + * @type string + */ + connectionId: string; +} + +export interface ActionConnectionApiUpdateActionConnectionRequest { + /** + * The ID of the action connection + * @type string + */ + connectionId: string; + /** + * Update an existing Action Connection request body + * @type UpdateActionConnectionRequest + */ + body: UpdateActionConnectionRequest; +} + +export class ActionConnectionApi { + private requestFactory: ActionConnectionApiRequestFactory; + private responseProcessor: ActionConnectionApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ActionConnectionApiRequestFactory, + responseProcessor?: ActionConnectionApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new ActionConnectionApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new ActionConnectionApiResponseProcessor(); + } + + /** + * Create a new Action Connection + * @param param The request object + */ + public createActionConnection( + param: ActionConnectionApiCreateActionConnectionRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createActionConnection( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createActionConnection(responseContext); + }); + }); + } + + /** + * Delete an existing Action Connection + * @param param The request object + */ + public deleteActionConnection( + param: ActionConnectionApiDeleteActionConnectionRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteActionConnection( + param.connectionId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteActionConnection(responseContext); + }); + }); + } + + /** + * Get an existing Action Connection + * @param param The request object + */ + public getActionConnection( + param: ActionConnectionApiGetActionConnectionRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getActionConnection( + param.connectionId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getActionConnection(responseContext); + }); + }); + } + + /** + * Update an existing Action Connection + * @param param The request object + */ + public updateActionConnection( + param: ActionConnectionApiUpdateActionConnectionRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateActionConnection( + param.connectionId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateActionConnection(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 86cf9b204f91..acb3aae5b4cf 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -27,6 +27,14 @@ export { export { AWSLogsIntegrationApi } from "./apis/AWSLogsIntegrationApi"; +export { + ActionConnectionApiCreateActionConnectionRequest, + ActionConnectionApiDeleteActionConnectionRequest, + ActionConnectionApiGetActionConnectionRequest, + ActionConnectionApiUpdateActionConnectionRequest, + ActionConnectionApi, +} from "./apis/ActionConnectionApi"; + export { AgentlessScanningApi } from "./apis/AgentlessScanningApi"; export { @@ -612,6 +620,13 @@ export { WorkflowAutomationApi, } from "./apis/WorkflowAutomationApi"; +export { ActionConnectionAttributes } from "./models/ActionConnectionAttributes"; +export { ActionConnectionAttributesUpdate } from "./models/ActionConnectionAttributesUpdate"; +export { ActionConnectionData } from "./models/ActionConnectionData"; +export { ActionConnectionDataType } from "./models/ActionConnectionDataType"; +export { ActionConnectionDataUpdate } from "./models/ActionConnectionDataUpdate"; +export { ActionConnectionIntegration } from "./models/ActionConnectionIntegration"; +export { ActionConnectionIntegrationUpdate } from "./models/ActionConnectionIntegrationUpdate"; export { ActiveBillingDimensionsAttributes } from "./models/ActiveBillingDimensionsAttributes"; export { ActiveBillingDimensionsBody } from "./models/ActiveBillingDimensionsBody"; export { ActiveBillingDimensionsResponse } from "./models/ActiveBillingDimensionsResponse"; @@ -705,9 +720,14 @@ export { AWSAccountType } from "./models/AWSAccountType"; export { AWSAccountUpdateRequest } from "./models/AWSAccountUpdateRequest"; export { AWSAccountUpdateRequestAttributes } from "./models/AWSAccountUpdateRequestAttributes"; export { AWSAccountUpdateRequestData } from "./models/AWSAccountUpdateRequestData"; +export { AWSAssumeRole } from "./models/AWSAssumeRole"; +export { AWSAssumeRoleType } from "./models/AWSAssumeRoleType"; +export { AWSAssumeRoleUpdate } from "./models/AWSAssumeRoleUpdate"; export { AWSAuthConfig } from "./models/AWSAuthConfig"; export { AWSAuthConfigKeys } from "./models/AWSAuthConfigKeys"; export { AWSAuthConfigRole } from "./models/AWSAuthConfigRole"; +export { AWSCredentials } from "./models/AWSCredentials"; +export { AWSCredentialsUpdate } from "./models/AWSCredentialsUpdate"; export { AwsCURConfig } from "./models/AwsCURConfig"; export { AwsCURConfigAttributes } from "./models/AwsCURConfigAttributes"; export { AwsCURConfigPatchData } from "./models/AwsCURConfigPatchData"; @@ -721,6 +741,9 @@ export { AwsCURConfigPostRequestType } from "./models/AwsCURConfigPostRequestTyp export { AwsCURConfigResponse } from "./models/AwsCURConfigResponse"; export { AwsCURConfigsResponse } from "./models/AwsCURConfigsResponse"; export { AwsCURConfigType } from "./models/AwsCURConfigType"; +export { AWSIntegration } from "./models/AWSIntegration"; +export { AWSIntegrationType } from "./models/AWSIntegrationType"; +export { AWSIntegrationUpdate } from "./models/AWSIntegrationUpdate"; export { AWSLambdaForwarderConfig } from "./models/AWSLambdaForwarderConfig"; export { AWSLogsConfig } from "./models/AWSLogsConfig"; export { AWSLogsServicesResponse } from "./models/AWSLogsServicesResponse"; @@ -991,6 +1014,8 @@ export { CostByOrg } from "./models/CostByOrg"; export { CostByOrgAttributes } from "./models/CostByOrgAttributes"; export { CostByOrgResponse } from "./models/CostByOrgResponse"; export { CostByOrgType } from "./models/CostByOrgType"; +export { CreateActionConnectionRequest } from "./models/CreateActionConnectionRequest"; +export { CreateActionConnectionResponse } from "./models/CreateActionConnectionResponse"; export { CreateAppRequest } from "./models/CreateAppRequest"; export { CreateAppRequestData } from "./models/CreateAppRequestData"; export { CreateAppRequestDataAttributes } from "./models/CreateAppRequestDataAttributes"; @@ -1324,6 +1349,7 @@ export { GCPSTSServiceAccountResponse } from "./models/GCPSTSServiceAccountRespo export { GCPSTSServiceAccountsResponse } from "./models/GCPSTSServiceAccountsResponse"; export { GCPSTSServiceAccountUpdateRequest } from "./models/GCPSTSServiceAccountUpdateRequest"; export { GCPSTSServiceAccountUpdateRequestData } from "./models/GCPSTSServiceAccountUpdateRequestData"; +export { GetActionConnectionResponse } from "./models/GetActionConnectionResponse"; export { GetAppResponse } from "./models/GetAppResponse"; export { GetAppResponseData } from "./models/GetAppResponseData"; export { GetAppResponseDataAttributes } from "./models/GetAppResponseDataAttributes"; @@ -1352,11 +1378,24 @@ export { HourlyUsageMetadata } from "./models/HourlyUsageMetadata"; export { HourlyUsagePagination } from "./models/HourlyUsagePagination"; export { HourlyUsageResponse } from "./models/HourlyUsageResponse"; export { HourlyUsageType } from "./models/HourlyUsageType"; +export { HTTPBody } from "./models/HTTPBody"; export { HTTPCIAppError } from "./models/HTTPCIAppError"; export { HTTPCIAppErrors } from "./models/HTTPCIAppErrors"; +export { HTTPCredentials } from "./models/HTTPCredentials"; +export { HTTPCredentialsUpdate } from "./models/HTTPCredentialsUpdate"; +export { HTTPHeader } from "./models/HTTPHeader"; +export { HTTPHeaderUpdate } from "./models/HTTPHeaderUpdate"; +export { HTTPIntegration } from "./models/HTTPIntegration"; +export { HTTPIntegrationType } from "./models/HTTPIntegrationType"; +export { HTTPIntegrationUpdate } from "./models/HTTPIntegrationUpdate"; export { HTTPLogError } from "./models/HTTPLogError"; export { HTTPLogErrors } from "./models/HTTPLogErrors"; export { HTTPLogItem } from "./models/HTTPLogItem"; +export { HTTPToken } from "./models/HTTPToken"; +export { HTTPTokenAuth } from "./models/HTTPTokenAuth"; +export { HTTPTokenAuthType } from "./models/HTTPTokenAuthType"; +export { HTTPTokenAuthUpdate } from "./models/HTTPTokenAuthUpdate"; +export { HTTPTokenUpdate } from "./models/HTTPTokenUpdate"; export { IdPMetadataFormData } from "./models/IdPMetadataFormData"; export { IncidentAttachmentAttachmentType } from "./models/IncidentAttachmentAttachmentType"; export { IncidentAttachmentAttributes } from "./models/IncidentAttachmentAttributes"; @@ -2402,7 +2441,10 @@ export { TimeseriesQuery } from "./models/TimeseriesQuery"; export { TimeseriesResponse } from "./models/TimeseriesResponse"; export { TimeseriesResponseAttributes } from "./models/TimeseriesResponseAttributes"; export { TimeseriesResponseSeries } from "./models/TimeseriesResponseSeries"; +export { TokenType } from "./models/TokenType"; export { Unit } from "./models/Unit"; +export { UpdateActionConnectionRequest } from "./models/UpdateActionConnectionRequest"; +export { UpdateActionConnectionResponse } from "./models/UpdateActionConnectionResponse"; export { UpdateAppRequest } from "./models/UpdateAppRequest"; export { UpdateAppRequestData } from "./models/UpdateAppRequestData"; export { UpdateAppRequestDataAttributes } from "./models/UpdateAppRequestDataAttributes"; @@ -2422,6 +2464,8 @@ export { UpdateRuleResponseData } from "./models/UpdateRuleResponseData"; export { UpsertCatalogEntityRequest } from "./models/UpsertCatalogEntityRequest"; export { UpsertCatalogEntityResponse } from "./models/UpsertCatalogEntityResponse"; export { UpsertCatalogEntityResponseIncludedItem } from "./models/UpsertCatalogEntityResponseIncludedItem"; +export { UrlParam } from "./models/UrlParam"; +export { UrlParamUpdate } from "./models/UrlParamUpdate"; export { UsageApplicationSecurityMonitoringResponse } from "./models/UsageApplicationSecurityMonitoringResponse"; export { UsageAttributesObject } from "./models/UsageAttributesObject"; export { UsageDataObject } from "./models/UsageDataObject"; diff --git a/packages/datadog-api-client-v2/models/AWSAssumeRole.ts b/packages/datadog-api-client-v2/models/AWSAssumeRole.ts new file mode 100644 index 000000000000..3e445dc0cabf --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAssumeRole.ts @@ -0,0 +1,88 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAssumeRoleType } from "./AWSAssumeRoleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSAssumeRole` object. + */ +export class AWSAssumeRole { + /** + * AWS account the connection is created for + */ + "accountId": string; + /** + * External ID used to scope which connection can be used to assume the role + */ + "externalId"?: string; + /** + * AWS account that will assume the role + */ + "principalId"?: string; + /** + * Role to assume + */ + "role": string; + /** + * The definition of `AWSAssumeRoleType` object. + */ + "type": AWSAssumeRoleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountId: { + baseName: "account_id", + type: "string", + required: true, + }, + externalId: { + baseName: "external_id", + type: "string", + }, + principalId: { + baseName: "principal_id", + type: "string", + }, + role: { + baseName: "role", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "AWSAssumeRoleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAssumeRole.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAssumeRoleType.ts b/packages/datadog-api-client-v2/models/AWSAssumeRoleType.ts new file mode 100644 index 000000000000..e911b552ebc2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAssumeRoleType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSAssumeRoleType` object. + */ + +export type AWSAssumeRoleType = typeof AWSASSUMEROLE | UnparsedObject; +export const AWSASSUMEROLE = "AWSAssumeRole"; diff --git a/packages/datadog-api-client-v2/models/AWSAssumeRoleUpdate.ts b/packages/datadog-api-client-v2/models/AWSAssumeRoleUpdate.ts new file mode 100644 index 000000000000..fa83489dd439 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAssumeRoleUpdate.ts @@ -0,0 +1,78 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAssumeRoleType } from "./AWSAssumeRoleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSAssumeRoleUpdate` object. + */ +export class AWSAssumeRoleUpdate { + /** + * AWS account the connection is created for + */ + "accountId"?: string; + /** + * The `AWSAssumeRoleUpdate` `generate_new_external_id`. + */ + "generateNewExternalId"?: boolean; + /** + * Role to assume + */ + "role"?: string; + /** + * The definition of `AWSAssumeRoleType` object. + */ + "type": AWSAssumeRoleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountId: { + baseName: "account_id", + type: "string", + }, + generateNewExternalId: { + baseName: "generate_new_external_id", + type: "boolean", + }, + role: { + baseName: "role", + type: "string", + }, + type: { + baseName: "type", + type: "AWSAssumeRoleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAssumeRoleUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSCredentials.ts b/packages/datadog-api-client-v2/models/AWSCredentials.ts new file mode 100644 index 000000000000..648b54179b3b --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSCredentials.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAssumeRole } from "./AWSAssumeRole"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSCredentials` object. + */ + +export type AWSCredentials = AWSAssumeRole | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/AWSCredentialsUpdate.ts b/packages/datadog-api-client-v2/models/AWSCredentialsUpdate.ts new file mode 100644 index 000000000000..99b8382c9055 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSCredentialsUpdate.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAssumeRoleUpdate } from "./AWSAssumeRoleUpdate"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSCredentialsUpdate` object. + */ + +export type AWSCredentialsUpdate = AWSAssumeRoleUpdate | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/AWSIntegration.ts b/packages/datadog-api-client-v2/models/AWSIntegration.ts new file mode 100644 index 000000000000..28157816b957 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSIntegration.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSCredentials } from "./AWSCredentials"; +import { AWSIntegrationType } from "./AWSIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSIntegration` object. + */ +export class AWSIntegration { + /** + * The definition of `AWSCredentials` object. + */ + "credentials": AWSCredentials; + /** + * The definition of `AWSIntegrationType` object. + */ + "type": AWSIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + credentials: { + baseName: "credentials", + type: "AWSCredentials", + required: true, + }, + type: { + baseName: "type", + type: "AWSIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSIntegration.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSIntegrationType.ts b/packages/datadog-api-client-v2/models/AWSIntegrationType.ts new file mode 100644 index 000000000000..787ca71828bc --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSIntegrationType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSIntegrationType` object. + */ + +export type AWSIntegrationType = typeof AWS | UnparsedObject; +export const AWS = "AWS"; diff --git a/packages/datadog-api-client-v2/models/AWSIntegrationUpdate.ts b/packages/datadog-api-client-v2/models/AWSIntegrationUpdate.ts new file mode 100644 index 000000000000..6ab25a5752bd --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSIntegrationUpdate.ts @@ -0,0 +1,63 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSCredentialsUpdate } from "./AWSCredentialsUpdate"; +import { AWSIntegrationType } from "./AWSIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AWSIntegrationUpdate` object. + */ +export class AWSIntegrationUpdate { + /** + * The definition of `AWSCredentialsUpdate` object. + */ + "credentials"?: AWSCredentialsUpdate; + /** + * The definition of `AWSIntegrationType` object. + */ + "type": AWSIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + credentials: { + baseName: "credentials", + type: "AWSCredentialsUpdate", + }, + type: { + baseName: "type", + type: "AWSIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSIntegrationUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ActionConnectionAttributes.ts b/packages/datadog-api-client-v2/models/ActionConnectionAttributes.ts new file mode 100644 index 000000000000..6be7fd711084 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ActionConnectionAttributes.ts @@ -0,0 +1,63 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionIntegration } from "./ActionConnectionIntegration"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ActionConnectionAttributes` object. + */ +export class ActionConnectionAttributes { + /** + * The definition of `ActionConnectionIntegration` object. + */ + "integration": ActionConnectionIntegration; + /** + * Name of the connection + */ + "name": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + integration: { + baseName: "integration", + type: "ActionConnectionIntegration", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ActionConnectionAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ActionConnectionAttributesUpdate.ts b/packages/datadog-api-client-v2/models/ActionConnectionAttributesUpdate.ts new file mode 100644 index 000000000000..535b88a8037d --- /dev/null +++ b/packages/datadog-api-client-v2/models/ActionConnectionAttributesUpdate.ts @@ -0,0 +1,61 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionIntegrationUpdate } from "./ActionConnectionIntegrationUpdate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ActionConnectionAttributesUpdate` object. + */ +export class ActionConnectionAttributesUpdate { + /** + * The definition of `ActionConnectionIntegrationUpdate` object. + */ + "integration"?: ActionConnectionIntegrationUpdate; + /** + * Name of the connection + */ + "name"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + integration: { + baseName: "integration", + type: "ActionConnectionIntegrationUpdate", + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ActionConnectionAttributesUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ActionConnectionData.ts b/packages/datadog-api-client-v2/models/ActionConnectionData.ts new file mode 100644 index 000000000000..145d7896385c --- /dev/null +++ b/packages/datadog-api-client-v2/models/ActionConnectionData.ts @@ -0,0 +1,72 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionAttributes } from "./ActionConnectionAttributes"; +import { ActionConnectionDataType } from "./ActionConnectionDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data related to the connection. + */ +export class ActionConnectionData { + /** + * The definition of `ActionConnectionAttributes` object. + */ + "attributes": ActionConnectionAttributes; + /** + * The connection identifier + */ + "id"?: string; + /** + * The definition of `ActionConnectionDataType` object. + */ + "type": ActionConnectionDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ActionConnectionAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "ActionConnectionDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ActionConnectionData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ActionConnectionDataType.ts b/packages/datadog-api-client-v2/models/ActionConnectionDataType.ts new file mode 100644 index 000000000000..213b944d7abb --- /dev/null +++ b/packages/datadog-api-client-v2/models/ActionConnectionDataType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ActionConnectionDataType` object. + */ + +export type ActionConnectionDataType = + | typeof ACTION_CONNECTION + | UnparsedObject; +export const ACTION_CONNECTION = "action_connection"; diff --git a/packages/datadog-api-client-v2/models/ActionConnectionDataUpdate.ts b/packages/datadog-api-client-v2/models/ActionConnectionDataUpdate.ts new file mode 100644 index 000000000000..8f5dd8607527 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ActionConnectionDataUpdate.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionAttributesUpdate } from "./ActionConnectionAttributesUpdate"; +import { ActionConnectionDataType } from "./ActionConnectionDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data related to the connection update. + */ +export class ActionConnectionDataUpdate { + /** + * The definition of `ActionConnectionAttributesUpdate` object. + */ + "attributes": ActionConnectionAttributesUpdate; + /** + * The definition of `ActionConnectionDataType` object. + */ + "type": ActionConnectionDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ActionConnectionAttributesUpdate", + required: true, + }, + type: { + baseName: "type", + type: "ActionConnectionDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ActionConnectionDataUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ActionConnectionIntegration.ts b/packages/datadog-api-client-v2/models/ActionConnectionIntegration.ts new file mode 100644 index 000000000000..9e8e18a3b163 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ActionConnectionIntegration.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSIntegration } from "./AWSIntegration"; +import { HTTPIntegration } from "./HTTPIntegration"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ActionConnectionIntegration` object. + */ + +export type ActionConnectionIntegration = + | AWSIntegration + | HTTPIntegration + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/ActionConnectionIntegrationUpdate.ts b/packages/datadog-api-client-v2/models/ActionConnectionIntegrationUpdate.ts new file mode 100644 index 000000000000..1339c47153a3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ActionConnectionIntegrationUpdate.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSIntegrationUpdate } from "./AWSIntegrationUpdate"; +import { HTTPIntegrationUpdate } from "./HTTPIntegrationUpdate"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ActionConnectionIntegrationUpdate` object. + */ + +export type ActionConnectionIntegrationUpdate = + | AWSIntegrationUpdate + | HTTPIntegrationUpdate + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/CreateActionConnectionRequest.ts b/packages/datadog-api-client-v2/models/CreateActionConnectionRequest.ts new file mode 100644 index 000000000000..2c1794cb826c --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateActionConnectionRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionData } from "./ActionConnectionData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request used to create an action connection. + */ +export class CreateActionConnectionRequest { + /** + * Data related to the connection. + */ + "data": ActionConnectionData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ActionConnectionData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateActionConnectionRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateActionConnectionResponse.ts b/packages/datadog-api-client-v2/models/CreateActionConnectionResponse.ts new file mode 100644 index 000000000000..fc8ccb777409 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateActionConnectionResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionData } from "./ActionConnectionData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response for a created connection + */ +export class CreateActionConnectionResponse { + /** + * Data related to the connection. + */ + "data"?: ActionConnectionData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ActionConnectionData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateActionConnectionResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GetActionConnectionResponse.ts b/packages/datadog-api-client-v2/models/GetActionConnectionResponse.ts new file mode 100644 index 000000000000..cdc5eb146445 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GetActionConnectionResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionData } from "./ActionConnectionData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response for found connection + */ +export class GetActionConnectionResponse { + /** + * Data related to the connection. + */ + "data"?: ActionConnectionData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ActionConnectionData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GetActionConnectionResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPBody.ts b/packages/datadog-api-client-v2/models/HTTPBody.ts new file mode 100644 index 000000000000..6f52c29fc018 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPBody.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPBody` object. + */ +export class HTTPBody { + /** + * Serialized body content + */ + "content"?: string; + /** + * Content type of the body + */ + "contentType"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + content: { + baseName: "content", + type: "string", + }, + contentType: { + baseName: "content_type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPBody.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPCredentials.ts b/packages/datadog-api-client-v2/models/HTTPCredentials.ts new file mode 100644 index 000000000000..3b2bfdd7e82a --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPCredentials.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPTokenAuth } from "./HTTPTokenAuth"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPCredentials` object. + */ + +export type HTTPCredentials = HTTPTokenAuth | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/HTTPCredentialsUpdate.ts b/packages/datadog-api-client-v2/models/HTTPCredentialsUpdate.ts new file mode 100644 index 000000000000..6714f74715b5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPCredentialsUpdate.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPTokenAuthUpdate } from "./HTTPTokenAuthUpdate"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPCredentialsUpdate` object. + */ + +export type HTTPCredentialsUpdate = HTTPTokenAuthUpdate | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/HTTPHeader.ts b/packages/datadog-api-client-v2/models/HTTPHeader.ts new file mode 100644 index 000000000000..c19fc848ea49 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPHeader.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPHeader` object. + */ +export class HTTPHeader { + /** + * The `HTTPHeader` `name`. + */ + "name": string; + /** + * The `HTTPHeader` `value`. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPHeader.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPHeaderUpdate.ts b/packages/datadog-api-client-v2/models/HTTPHeaderUpdate.ts new file mode 100644 index 000000000000..e81a0076937e --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPHeaderUpdate.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPHeaderUpdate` object. + */ +export class HTTPHeaderUpdate { + /** + * Should the header be deleted. + */ + "deleted"?: boolean; + /** + * The `HTTPHeaderUpdate` `name`. + */ + "name": string; + /** + * The `HTTPHeaderUpdate` `value`. + */ + "value"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + deleted: { + baseName: "deleted", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + value: { + baseName: "value", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPHeaderUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPIntegration.ts b/packages/datadog-api-client-v2/models/HTTPIntegration.ts new file mode 100644 index 000000000000..38cdcdd324dc --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPIntegration.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPCredentials } from "./HTTPCredentials"; +import { HTTPIntegrationType } from "./HTTPIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPIntegration` object. + */ +export class HTTPIntegration { + /** + * Base HTTP url for the integration + */ + "baseUrl": string; + /** + * The definition of `HTTPCredentials` object. + */ + "credentials": HTTPCredentials; + /** + * The definition of `HTTPIntegrationType` object. + */ + "type": HTTPIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + baseUrl: { + baseName: "base_url", + type: "string", + required: true, + }, + credentials: { + baseName: "credentials", + type: "HTTPCredentials", + required: true, + }, + type: { + baseName: "type", + type: "HTTPIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPIntegration.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPIntegrationType.ts b/packages/datadog-api-client-v2/models/HTTPIntegrationType.ts new file mode 100644 index 000000000000..55a147ca6235 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPIntegrationType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPIntegrationType` object. + */ + +export type HTTPIntegrationType = typeof HTTP | UnparsedObject; +export const HTTP = "HTTP"; diff --git a/packages/datadog-api-client-v2/models/HTTPIntegrationUpdate.ts b/packages/datadog-api-client-v2/models/HTTPIntegrationUpdate.ts new file mode 100644 index 000000000000..093177ac0776 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPIntegrationUpdate.ts @@ -0,0 +1,71 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPCredentialsUpdate } from "./HTTPCredentialsUpdate"; +import { HTTPIntegrationType } from "./HTTPIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPIntegrationUpdate` object. + */ +export class HTTPIntegrationUpdate { + /** + * Base HTTP url for the integration + */ + "baseUrl"?: string; + /** + * The definition of `HTTPCredentialsUpdate` object. + */ + "credentials"?: HTTPCredentialsUpdate; + /** + * The definition of `HTTPIntegrationType` object. + */ + "type": HTTPIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + baseUrl: { + baseName: "base_url", + type: "string", + }, + credentials: { + baseName: "credentials", + type: "HTTPCredentialsUpdate", + }, + type: { + baseName: "type", + type: "HTTPIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPIntegrationUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPToken.ts b/packages/datadog-api-client-v2/models/HTTPToken.ts new file mode 100644 index 000000000000..ae48410d2f65 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPToken.ts @@ -0,0 +1,72 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TokenType } from "./TokenType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPToken` object. + */ +export class HTTPToken { + /** + * The `HTTPToken` `name`. + */ + "name": string; + /** + * The definition of `TokenType` object. + */ + "type": TokenType; + /** + * The `HTTPToken` `value`. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "TokenType", + required: true, + }, + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPToken.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPTokenAuth.ts b/packages/datadog-api-client-v2/models/HTTPTokenAuth.ts new file mode 100644 index 000000000000..f9c857b5ac86 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPTokenAuth.ts @@ -0,0 +1,90 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPBody } from "./HTTPBody"; +import { HTTPHeader } from "./HTTPHeader"; +import { HTTPToken } from "./HTTPToken"; +import { HTTPTokenAuthType } from "./HTTPTokenAuthType"; +import { UrlParam } from "./UrlParam"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPTokenAuth` object. + */ +export class HTTPTokenAuth { + /** + * The definition of `HTTPBody` object. + */ + "body"?: HTTPBody; + /** + * The `HTTPTokenAuth` `headers`. + */ + "headers"?: Array; + /** + * The `HTTPTokenAuth` `tokens`. + */ + "tokens"?: Array; + /** + * The definition of `HTTPTokenAuthType` object. + */ + "type": HTTPTokenAuthType; + /** + * The `HTTPTokenAuth` `url_parameters`. + */ + "urlParameters"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + body: { + baseName: "body", + type: "HTTPBody", + }, + headers: { + baseName: "headers", + type: "Array", + }, + tokens: { + baseName: "tokens", + type: "Array", + }, + type: { + baseName: "type", + type: "HTTPTokenAuthType", + required: true, + }, + urlParameters: { + baseName: "url_parameters", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPTokenAuth.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPTokenAuthType.ts b/packages/datadog-api-client-v2/models/HTTPTokenAuthType.ts new file mode 100644 index 000000000000..c4c23cfa0682 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPTokenAuthType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPTokenAuthType` object. + */ + +export type HTTPTokenAuthType = typeof HTTPTOKENAUTH | UnparsedObject; +export const HTTPTOKENAUTH = "HTTPTokenAuth"; diff --git a/packages/datadog-api-client-v2/models/HTTPTokenAuthUpdate.ts b/packages/datadog-api-client-v2/models/HTTPTokenAuthUpdate.ts new file mode 100644 index 000000000000..2e3222c2da72 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPTokenAuthUpdate.ts @@ -0,0 +1,90 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { HTTPBody } from "./HTTPBody"; +import { HTTPHeaderUpdate } from "./HTTPHeaderUpdate"; +import { HTTPTokenAuthType } from "./HTTPTokenAuthType"; +import { HTTPTokenUpdate } from "./HTTPTokenUpdate"; +import { UrlParamUpdate } from "./UrlParamUpdate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPTokenAuthUpdate` object. + */ +export class HTTPTokenAuthUpdate { + /** + * The definition of `HTTPBody` object. + */ + "body"?: HTTPBody; + /** + * The `HTTPTokenAuthUpdate` `headers`. + */ + "headers"?: Array; + /** + * The `HTTPTokenAuthUpdate` `tokens`. + */ + "tokens"?: Array; + /** + * The definition of `HTTPTokenAuthType` object. + */ + "type": HTTPTokenAuthType; + /** + * The `HTTPTokenAuthUpdate` `url_parameters`. + */ + "urlParameters"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + body: { + baseName: "body", + type: "HTTPBody", + }, + headers: { + baseName: "headers", + type: "Array", + }, + tokens: { + baseName: "tokens", + type: "Array", + }, + type: { + baseName: "type", + type: "HTTPTokenAuthType", + required: true, + }, + urlParameters: { + baseName: "url_parameters", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPTokenAuthUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/HTTPTokenUpdate.ts b/packages/datadog-api-client-v2/models/HTTPTokenUpdate.ts new file mode 100644 index 000000000000..436dc4b8e0e6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/HTTPTokenUpdate.ts @@ -0,0 +1,80 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TokenType } from "./TokenType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `HTTPTokenUpdate` object. + */ +export class HTTPTokenUpdate { + /** + * Should the header be deleted. + */ + "deleted"?: boolean; + /** + * The `HTTPToken` `name`. + */ + "name": string; + /** + * The definition of `TokenType` object. + */ + "type": TokenType; + /** + * The `HTTPToken` `value`. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + deleted: { + baseName: "deleted", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "TokenType", + required: true, + }, + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return HTTPTokenUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index b67d3443ecac..b8075e1ac61b 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -20,8 +20,12 @@ import { AWSAccountUpdateRequest } from "./AWSAccountUpdateRequest"; import { AWSAccountUpdateRequestAttributes } from "./AWSAccountUpdateRequestAttributes"; import { AWSAccountUpdateRequestData } from "./AWSAccountUpdateRequestData"; import { AWSAccountsResponse } from "./AWSAccountsResponse"; +import { AWSAssumeRole } from "./AWSAssumeRole"; +import { AWSAssumeRoleUpdate } from "./AWSAssumeRoleUpdate"; import { AWSAuthConfigKeys } from "./AWSAuthConfigKeys"; import { AWSAuthConfigRole } from "./AWSAuthConfigRole"; +import { AWSIntegration } from "./AWSIntegration"; +import { AWSIntegrationUpdate } from "./AWSIntegrationUpdate"; import { AWSLambdaForwarderConfig } from "./AWSLambdaForwarderConfig"; import { AWSLogsConfig } from "./AWSLogsConfig"; import { AWSLogsServicesResponse } from "./AWSLogsServicesResponse"; @@ -41,6 +45,10 @@ import { AWSRegionsIncludeAll } from "./AWSRegionsIncludeAll"; import { AWSRegionsIncludeOnly } from "./AWSRegionsIncludeOnly"; import { AWSResourcesConfig } from "./AWSResourcesConfig"; import { AWSTracesConfig } from "./AWSTracesConfig"; +import { ActionConnectionAttributes } from "./ActionConnectionAttributes"; +import { ActionConnectionAttributesUpdate } from "./ActionConnectionAttributesUpdate"; +import { ActionConnectionData } from "./ActionConnectionData"; +import { ActionConnectionDataUpdate } from "./ActionConnectionDataUpdate"; import { ActiveBillingDimensionsAttributes } from "./ActiveBillingDimensionsAttributes"; import { ActiveBillingDimensionsBody } from "./ActiveBillingDimensionsBody"; import { ActiveBillingDimensionsResponse } from "./ActiveBillingDimensionsResponse"; @@ -285,6 +293,8 @@ import { CostAttributionAggregatesBody } from "./CostAttributionAggregatesBody"; import { CostByOrg } from "./CostByOrg"; import { CostByOrgAttributes } from "./CostByOrgAttributes"; import { CostByOrgResponse } from "./CostByOrgResponse"; +import { CreateActionConnectionRequest } from "./CreateActionConnectionRequest"; +import { CreateActionConnectionResponse } from "./CreateActionConnectionResponse"; import { CreateAppRequest } from "./CreateAppRequest"; import { CreateAppRequestData } from "./CreateAppRequestData"; import { CreateAppRequestDataAttributes } from "./CreateAppRequestDataAttributes"; @@ -549,6 +559,7 @@ import { GCPSTSServiceAccountUpdateRequest } from "./GCPSTSServiceAccountUpdateR import { GCPSTSServiceAccountUpdateRequestData } from "./GCPSTSServiceAccountUpdateRequestData"; import { GCPSTSServiceAccountsResponse } from "./GCPSTSServiceAccountsResponse"; import { GCPServiceAccountMeta } from "./GCPServiceAccountMeta"; +import { GetActionConnectionResponse } from "./GetActionConnectionResponse"; import { GetAppResponse } from "./GetAppResponse"; import { GetAppResponseData } from "./GetAppResponseData"; import { GetAppResponseDataAttributes } from "./GetAppResponseDataAttributes"; @@ -561,11 +572,20 @@ import { GetFindingResponse } from "./GetFindingResponse"; import { GetInterfacesData } from "./GetInterfacesData"; import { GetInterfacesResponse } from "./GetInterfacesResponse"; import { GroupScalarColumn } from "./GroupScalarColumn"; +import { HTTPBody } from "./HTTPBody"; import { HTTPCIAppError } from "./HTTPCIAppError"; import { HTTPCIAppErrors } from "./HTTPCIAppErrors"; +import { HTTPHeader } from "./HTTPHeader"; +import { HTTPHeaderUpdate } from "./HTTPHeaderUpdate"; +import { HTTPIntegration } from "./HTTPIntegration"; +import { HTTPIntegrationUpdate } from "./HTTPIntegrationUpdate"; import { HTTPLogError } from "./HTTPLogError"; import { HTTPLogErrors } from "./HTTPLogErrors"; import { HTTPLogItem } from "./HTTPLogItem"; +import { HTTPToken } from "./HTTPToken"; +import { HTTPTokenAuth } from "./HTTPTokenAuth"; +import { HTTPTokenAuthUpdate } from "./HTTPTokenAuthUpdate"; +import { HTTPTokenUpdate } from "./HTTPTokenUpdate"; import { HistoricalJobListMeta } from "./HistoricalJobListMeta"; import { HistoricalJobOptions } from "./HistoricalJobOptions"; import { HistoricalJobQuery } from "./HistoricalJobQuery"; @@ -1388,6 +1408,8 @@ import { TimeseriesResponse } from "./TimeseriesResponse"; import { TimeseriesResponseAttributes } from "./TimeseriesResponseAttributes"; import { TimeseriesResponseSeries } from "./TimeseriesResponseSeries"; import { Unit } from "./Unit"; +import { UpdateActionConnectionRequest } from "./UpdateActionConnectionRequest"; +import { UpdateActionConnectionResponse } from "./UpdateActionConnectionResponse"; import { UpdateAppRequest } from "./UpdateAppRequest"; import { UpdateAppRequestData } from "./UpdateAppRequestData"; import { UpdateAppRequestDataAttributes } from "./UpdateAppRequestDataAttributes"; @@ -1403,6 +1425,8 @@ import { UpdateRuleRequestData } from "./UpdateRuleRequestData"; import { UpdateRuleResponse } from "./UpdateRuleResponse"; import { UpdateRuleResponseData } from "./UpdateRuleResponseData"; import { UpsertCatalogEntityResponse } from "./UpsertCatalogEntityResponse"; +import { UrlParam } from "./UrlParam"; +import { UrlParamUpdate } from "./UrlParamUpdate"; import { UsageApplicationSecurityMonitoringResponse } from "./UsageApplicationSecurityMonitoringResponse"; import { UsageAttributesObject } from "./UsageAttributesObject"; import { UsageDataObject } from "./UsageDataObject"; @@ -1505,9 +1529,12 @@ const enumsMap: { [key: string]: any[] } = { APIKeysType: ["api_keys"], AWSAccountPartition: ["aws", "aws-cn", "aws-us-gov"], AWSAccountType: ["account"], + AWSAssumeRoleType: ["AWSAssumeRole"], + AWSIntegrationType: ["AWS"], AWSLogsServicesResponseDataType: ["logs_services"], AWSNamespacesResponseDataType: ["namespaces"], AWSNewExternalIDResponseDataType: ["external_id"], + ActionConnectionDataType: ["action_connection"], ActiveBillingDimensionsType: ["billing_dimensions"], ApmRetentionFilterType: ["apm_retention_filter"], AppBuilderEventName: [ @@ -1790,6 +1817,8 @@ const enumsMap: { [key: string]: any[] } = { "email", "-email", ], + HTTPIntegrationType: ["HTTP"], + HTTPTokenAuthType: ["HTTPTokenAuth"], HistoricalJobDataType: ["historicalDetectionsJob"], HourlyUsageType: [ "app_sec_host_count", @@ -2190,6 +2219,7 @@ const enumsMap: { [key: string]: any[] } = { ], TimeseriesFormulaRequestType: ["timeseries_request"], TimeseriesFormulaResponseType: ["timeseries_response"], + TokenType: ["SECRET"], UpdateAppRequestDataType: ["appDefinitions"], UpdateAppResponseDataType: ["appDefinitions"], UsageTimeSeriesType: ["usage_timeseries"], @@ -2317,8 +2347,12 @@ const typeMap: { [index: string]: any } = { AWSAccountUpdateRequestAttributes: AWSAccountUpdateRequestAttributes, AWSAccountUpdateRequestData: AWSAccountUpdateRequestData, AWSAccountsResponse: AWSAccountsResponse, + AWSAssumeRole: AWSAssumeRole, + AWSAssumeRoleUpdate: AWSAssumeRoleUpdate, AWSAuthConfigKeys: AWSAuthConfigKeys, AWSAuthConfigRole: AWSAuthConfigRole, + AWSIntegration: AWSIntegration, + AWSIntegrationUpdate: AWSIntegrationUpdate, AWSLambdaForwarderConfig: AWSLambdaForwarderConfig, AWSLogsConfig: AWSLogsConfig, AWSLogsServicesResponse: AWSLogsServicesResponse, @@ -2338,6 +2372,10 @@ const typeMap: { [index: string]: any } = { AWSRegionsIncludeOnly: AWSRegionsIncludeOnly, AWSResourcesConfig: AWSResourcesConfig, AWSTracesConfig: AWSTracesConfig, + ActionConnectionAttributes: ActionConnectionAttributes, + ActionConnectionAttributesUpdate: ActionConnectionAttributesUpdate, + ActionConnectionData: ActionConnectionData, + ActionConnectionDataUpdate: ActionConnectionDataUpdate, ActiveBillingDimensionsAttributes: ActiveBillingDimensionsAttributes, ActiveBillingDimensionsBody: ActiveBillingDimensionsBody, ActiveBillingDimensionsResponse: ActiveBillingDimensionsResponse, @@ -2608,6 +2646,8 @@ const typeMap: { [index: string]: any } = { CostByOrg: CostByOrg, CostByOrgAttributes: CostByOrgAttributes, CostByOrgResponse: CostByOrgResponse, + CreateActionConnectionRequest: CreateActionConnectionRequest, + CreateActionConnectionResponse: CreateActionConnectionResponse, CreateAppRequest: CreateAppRequest, CreateAppRequestData: CreateAppRequestData, CreateAppRequestDataAttributes: CreateAppRequestDataAttributes, @@ -2910,6 +2950,7 @@ const typeMap: { [index: string]: any } = { GCPSTSServiceAccountUpdateRequestData: GCPSTSServiceAccountUpdateRequestData, GCPSTSServiceAccountsResponse: GCPSTSServiceAccountsResponse, GCPServiceAccountMeta: GCPServiceAccountMeta, + GetActionConnectionResponse: GetActionConnectionResponse, GetAppResponse: GetAppResponse, GetAppResponseData: GetAppResponseData, GetAppResponseDataAttributes: GetAppResponseDataAttributes, @@ -2922,11 +2963,20 @@ const typeMap: { [index: string]: any } = { GetInterfacesData: GetInterfacesData, GetInterfacesResponse: GetInterfacesResponse, GroupScalarColumn: GroupScalarColumn, + HTTPBody: HTTPBody, HTTPCIAppError: HTTPCIAppError, HTTPCIAppErrors: HTTPCIAppErrors, + HTTPHeader: HTTPHeader, + HTTPHeaderUpdate: HTTPHeaderUpdate, + HTTPIntegration: HTTPIntegration, + HTTPIntegrationUpdate: HTTPIntegrationUpdate, HTTPLogError: HTTPLogError, HTTPLogErrors: HTTPLogErrors, HTTPLogItem: HTTPLogItem, + HTTPToken: HTTPToken, + HTTPTokenAuth: HTTPTokenAuth, + HTTPTokenAuthUpdate: HTTPTokenAuthUpdate, + HTTPTokenUpdate: HTTPTokenUpdate, HistoricalJobListMeta: HistoricalJobListMeta, HistoricalJobOptions: HistoricalJobOptions, HistoricalJobQuery: HistoricalJobQuery, @@ -3847,6 +3897,8 @@ const typeMap: { [index: string]: any } = { TimeseriesResponseAttributes: TimeseriesResponseAttributes, TimeseriesResponseSeries: TimeseriesResponseSeries, Unit: Unit, + UpdateActionConnectionRequest: UpdateActionConnectionRequest, + UpdateActionConnectionResponse: UpdateActionConnectionResponse, UpdateAppRequest: UpdateAppRequest, UpdateAppRequestData: UpdateAppRequestData, UpdateAppRequestDataAttributes: UpdateAppRequestDataAttributes, @@ -3862,6 +3914,8 @@ const typeMap: { [index: string]: any } = { UpdateRuleResponse: UpdateRuleResponse, UpdateRuleResponseData: UpdateRuleResponseData, UpsertCatalogEntityResponse: UpsertCatalogEntityResponse, + UrlParam: UrlParam, + UrlParamUpdate: UrlParamUpdate, UsageApplicationSecurityMonitoringResponse: UsageApplicationSecurityMonitoringResponse, UsageAttributesObject: UsageAttributesObject, @@ -3931,11 +3985,18 @@ const typeMap: { [index: string]: any } = { const oneOfMap: { [index: string]: string[] } = { APIKeyResponseIncludedItem: ["User", "LeakedKey"], AWSAuthConfig: ["AWSAuthConfigKeys", "AWSAuthConfigRole"], + AWSCredentials: ["AWSAssumeRole"], + AWSCredentialsUpdate: ["AWSAssumeRoleUpdate"], AWSNamespaceFilters: [ "AWSNamespaceFiltersExcludeOnly", "AWSNamespaceFiltersIncludeOnly", ], AWSRegions: ["AWSRegionsIncludeAll", "AWSRegionsIncludeOnly"], + ActionConnectionIntegration: ["AWSIntegration", "HTTPIntegration"], + ActionConnectionIntegrationUpdate: [ + "AWSIntegrationUpdate", + "HTTPIntegrationUpdate", + ], ApplicationKeyResponseIncludedItem: ["User", "Role", "LeakedKey"], AuthNMappingCreateRelationships: [ "AuthNMappingRelationshipToRole", @@ -4009,6 +4070,8 @@ const oneOfMap: { [index: string]: string[] } = { "EntityV3System", ], EventPayloadAttributes: ["ChangeEventCustomAttributes"], + HTTPCredentials: ["HTTPTokenAuth"], + HTTPCredentialsUpdate: ["HTTPTokenAuthUpdate"], IncidentAttachmentAttributes: [ "IncidentAttachmentPostmortemAttributes", "IncidentAttachmentLinkAttributes", diff --git a/packages/datadog-api-client-v2/models/TokenType.ts b/packages/datadog-api-client-v2/models/TokenType.ts new file mode 100644 index 000000000000..2881accf6a4b --- /dev/null +++ b/packages/datadog-api-client-v2/models/TokenType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `TokenType` object. + */ + +export type TokenType = typeof SECRET | UnparsedObject; +export const SECRET = "SECRET"; diff --git a/packages/datadog-api-client-v2/models/UpdateActionConnectionRequest.ts b/packages/datadog-api-client-v2/models/UpdateActionConnectionRequest.ts new file mode 100644 index 000000000000..6af0a7785267 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateActionConnectionRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionDataUpdate } from "./ActionConnectionDataUpdate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request used to update an action connection. + */ +export class UpdateActionConnectionRequest { + /** + * Data related to the connection update. + */ + "data": ActionConnectionDataUpdate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ActionConnectionDataUpdate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateActionConnectionRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateActionConnectionResponse.ts b/packages/datadog-api-client-v2/models/UpdateActionConnectionResponse.ts new file mode 100644 index 000000000000..b23086d5c677 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateActionConnectionResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ActionConnectionData } from "./ActionConnectionData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response for an updated connection. + */ +export class UpdateActionConnectionResponse { + /** + * Data related to the connection. + */ + "data"?: ActionConnectionData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ActionConnectionData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateActionConnectionResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UrlParam.ts b/packages/datadog-api-client-v2/models/UrlParam.ts new file mode 100644 index 000000000000..615d77485921 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UrlParam.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `UrlParam` object. + */ +export class UrlParam { + /** + * Name for tokens. + */ + "name": string; + /** + * The `UrlParam` `value`. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UrlParam.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UrlParamUpdate.ts b/packages/datadog-api-client-v2/models/UrlParamUpdate.ts new file mode 100644 index 000000000000..779eb9851ecd --- /dev/null +++ b/packages/datadog-api-client-v2/models/UrlParamUpdate.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `UrlParamUpdate` object. + */ +export class UrlParamUpdate { + /** + * Should the header be deleted. + */ + "deleted"?: boolean; + /** + * Name for tokens. + */ + "name": string; + /** + * The `UrlParamUpdate` `value`. + */ + "value"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + deleted: { + baseName: "deleted", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + value: { + baseName: "value", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UrlParamUpdate.attributeTypeMap; + } + + public constructor() {} +}