Skip to content

Commit

Permalink
Regenerate client from commit afec274 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 14, 2022
1 parent 968a042 commit e6d3126
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2022-01-13 12:57:54.756060",
"spec_repo_commit": "1ae19d0"
"regenerated": "2022-01-14 10:04:55.681378",
"spec_repo_commit": "afec274"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2022-01-13 12:57:54.780238",
"spec_repo_commit": "1ae19d0"
"regenerated": "2022-01-14 10:04:55.703175",
"spec_repo_commit": "afec274"
}
}
}
8 changes: 7 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ components:
data:
description: A list of Agent rules objects.
items:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleAttributes'
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData'
type: array
type: object
ContentEncoding:
Expand Down Expand Up @@ -8689,6 +8689,7 @@ paths:
summary: Get the latest Cloud Workload Security policy
tags:
- Cloud Workload Security
x-menu-order: 1
x-undo:
type: safe
/api/v2/security_monitoring/cloud_workload_security/agent_rules:
Expand All @@ -8714,6 +8715,7 @@ paths:
summary: Get all Cloud Workload Security Agent rules
tags:
- Cloud Workload Security
x-menu-order: 3
x-undo:
type: safe
post:
Expand Down Expand Up @@ -8759,6 +8761,7 @@ paths:
\"My Agent rule\",\n \"expression\": \"exec.file.name == \\\"sh\\\"\",\n
\ \"enabled\": true\n }\n }\n}"
step: there is a valid "agent_rule" in the system
x-menu-order: 4
x-undo:
operationId: DeleteCloudWorkloadSecurityAgentRule
parameters:
Expand Down Expand Up @@ -8788,6 +8791,7 @@ paths:
summary: Delete a Cloud Workload Security Agent rule
tags:
- Cloud Workload Security
x-menu-order: 6
x-undo:
type: idempotent
get:
Expand Down Expand Up @@ -8816,6 +8820,7 @@ paths:
summary: Get a Cloud Workload Security Agent rule
tags:
- Cloud Workload Security
x-menu-order: 2
x-undo:
type: safe
patch:
Expand Down Expand Up @@ -8858,6 +8863,7 @@ paths:
tags:
- Cloud Workload Security
x-codegen-request-body-name: body
x-menu-order: 5
x-undo:
type: idempotent
/api/v2/security_monitoring/configuration/security_filters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Properties

| Name | Type | Description | Notes |
| -------- | -------------------------------------------------------------------------------------------------------- | ------------------------------ | ---------- |
| **Data** | Pointer to [**[]CloudWorkloadSecurityAgentRuleAttributes**](CloudWorkloadSecurityAgentRuleAttributes.md) | A list of Agent rules objects. | [optional] |
| Name | Type | Description | Notes |
| -------- | -------------------------------------------------------------------------------------------- | ------------------------------ | ---------- |
| **Data** | Pointer to [**[]CloudWorkloadSecurityAgentRuleData**](CloudWorkloadSecurityAgentRuleData.md) | A list of Agent rules objects. | [optional] |

## Methods

Expand All @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set.

### GetData

`func (o *CloudWorkloadSecurityAgentRulesListResponse) GetData() []CloudWorkloadSecurityAgentRuleAttributes`
`func (o *CloudWorkloadSecurityAgentRulesListResponse) GetData() []CloudWorkloadSecurityAgentRuleData`

GetData returns the Data field if non-nil, zero value otherwise.

### GetDataOk

`func (o *CloudWorkloadSecurityAgentRulesListResponse) GetDataOk() (*[]CloudWorkloadSecurityAgentRuleAttributes, bool)`
`func (o *CloudWorkloadSecurityAgentRulesListResponse) GetDataOk() (*[]CloudWorkloadSecurityAgentRuleData, bool)`

GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetData

`func (o *CloudWorkloadSecurityAgentRulesListResponse) SetData(v []CloudWorkloadSecurityAgentRuleAttributes)`
`func (o *CloudWorkloadSecurityAgentRulesListResponse) SetData(v []CloudWorkloadSecurityAgentRuleData)`

SetData sets Data field to given value.

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tests/scenarios/features/v2/cloud_workload_security.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Feature: Cloud Workload Security
And body with value {"data": {"attributes": {"description": "Test Agent rule", "enabled": true, "expression": "exec.file.name == \"sh\"", "name": "{{ unique_lower_alnum }}"}, "type": "agent_rule"}}
When the request is sent
Then the response status is 200 OK
And the response "data.type" is equal to "agent_rule"
And the response "data.attributes.description" is equal to "Test Agent rule"

@team:DataDog/cws-backend @team:DataDog/security-monitoring
Scenario: Delete a Cloud Workload Security Agent rule returns "Not Found" response
Expand Down Expand Up @@ -58,13 +60,17 @@ Feature: Cloud Workload Security
And request contains "agent_rule_id" parameter from "agent_rule.data.id"
When the request is sent
Then the response status is 200 OK
And the response "data.type" is equal to "agent_rule"
And the response "data.attributes.description" is equal to "My Agent rule"

@team:DataDog/cws-backend @team:DataDog/security-monitoring
Scenario: Get all Cloud Workload Security Agent rules returns "OK" response
Given there is a valid "agent_rule" in the system
And new "ListCloudWorkloadSecurityAgentRules" request
When the request is sent
Then the response status is 200 OK
And the response "data[0].type" is equal to "agent_rule"
And the response "data[0].attributes.description" is equal to "My Agent rule"

@team:DataDog/cws-backend @team:DataDog/security-monitoring
Scenario: Get the latest Cloud Workload Security policy returns "OK" response
Expand Down Expand Up @@ -105,3 +111,5 @@ Feature: Cloud Workload Security
And body with value {"data": {"attributes": {"description": "Test Agent rule", "enabled": true, "expression": "exec.file.name == \"sh\""}, "type": "agent_rule"}}
When the request is sent
Then the response status is 200 OK
And the response "data.type" is equal to "agent_rule"
And the response "data.attributes.description" is equal to "Test Agent rule"

0 comments on commit e6d3126

Please sign in to comment.