Skip to content

Commit f3ab27a

Browse files
feat(workloadmanager): update the API
#### workloadmanager:v1 The following keys were added: - schemas.Execution.properties.ruleResults.description - schemas.Execution.properties.ruleResults.items.$ref - schemas.Execution.properties.ruleResults.readOnly - schemas.Execution.properties.ruleResults.type - schemas.ExecutionResult.properties.type.description - schemas.ExecutionResult.properties.type.enum - schemas.ExecutionResult.properties.type.enumDescriptions - schemas.ExecutionResult.properties.type.type - schemas.RuleExecutionResult.description - schemas.RuleExecutionResult.id - schemas.RuleExecutionResult.properties.message.description - schemas.RuleExecutionResult.properties.message.type - schemas.RuleExecutionResult.properties.resultCount.description - schemas.RuleExecutionResult.properties.resultCount.format - schemas.RuleExecutionResult.properties.resultCount.type - schemas.RuleExecutionResult.properties.rule.description - schemas.RuleExecutionResult.properties.rule.type - schemas.RuleExecutionResult.properties.scannedResourceCount.description - schemas.RuleExecutionResult.properties.scannedResourceCount.format - schemas.RuleExecutionResult.properties.scannedResourceCount.type - schemas.RuleExecutionResult.properties.state.description - schemas.RuleExecutionResult.properties.state.enum - schemas.RuleExecutionResult.properties.state.enumDescriptions - schemas.RuleExecutionResult.properties.state.readOnly - schemas.RuleExecutionResult.properties.state.type - schemas.RuleExecutionResult.type - schemas.SapDiscoveryResourceInstanceProperties.properties.isDrSite.description - schemas.SapDiscoveryResourceInstanceProperties.properties.isDrSite.type
1 parent 2536db1 commit f3ab27a

File tree

2 files changed

+106
-1
lines changed

2 files changed

+106
-1
lines changed

discovery/workloadmanager-v1.json

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@
772772
}
773773
}
774774
},
775-
"revision": "20240821",
775+
"revision": "20241009",
776776
"rootUrl": "https://workloadmanager.googleapis.com/",
777777
"schemas": {
778778
"AgentCommand": {
@@ -1029,6 +1029,14 @@
10291029
"description": "The name of execution resource. The format is projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}",
10301030
"type": "string"
10311031
},
1032+
"ruleResults": {
1033+
"description": "Output only. execution result summary per rule",
1034+
"items": {
1035+
"$ref": "RuleExecutionResult"
1036+
},
1037+
"readOnly": true,
1038+
"type": "array"
1039+
},
10321040
"runType": {
10331041
"description": "type represent whether the execution executed directly by user or scheduled according evaluation.schedule field.",
10341042
"enum": [
@@ -1096,6 +1104,20 @@
10961104
"description": "The severity of violation.",
10971105
"type": "string"
10981106
},
1107+
"type": {
1108+
"description": "Execution result type of the scanned resource",
1109+
"enum": [
1110+
"TYPE_UNSPECIFIED",
1111+
"TYPE_PASSED",
1112+
"TYPE_VIOLATED"
1113+
],
1114+
"enumDescriptions": [
1115+
"Unknown state",
1116+
"resource successfully passed the rule",
1117+
"resource violated the rule"
1118+
],
1119+
"type": "string"
1120+
},
10991121
"violationDetails": {
11001122
"$ref": "ViolationDetails",
11011123
"description": "The details of violation in an evaluation result."
@@ -1833,6 +1855,48 @@
18331855
},
18341856
"type": "object"
18351857
},
1858+
"RuleExecutionResult": {
1859+
"description": "Message for execution result summary per rule",
1860+
"id": "RuleExecutionResult",
1861+
"properties": {
1862+
"message": {
1863+
"description": "Execution message, if any",
1864+
"type": "string"
1865+
},
1866+
"resultCount": {
1867+
"description": "Number of violations",
1868+
"format": "int64",
1869+
"type": "string"
1870+
},
1871+
"rule": {
1872+
"description": "rule name",
1873+
"type": "string"
1874+
},
1875+
"scannedResourceCount": {
1876+
"description": "Number of total scanned resources",
1877+
"format": "int64",
1878+
"type": "string"
1879+
},
1880+
"state": {
1881+
"description": "Output only. The execution status",
1882+
"enum": [
1883+
"STATE_UNSPECIFIED",
1884+
"STATE_SUCCESS",
1885+
"STATE_FAILURE",
1886+
"STATE_SKIPPED"
1887+
],
1888+
"enumDescriptions": [
1889+
"Unknown state",
1890+
"execution completed successfully",
1891+
"execution completed with failures",
1892+
"execution was not executed"
1893+
],
1894+
"readOnly": true,
1895+
"type": "string"
1896+
}
1897+
},
1898+
"type": "object"
1899+
},
18361900
"RunEvaluationRequest": {
18371901
"description": "Message for creating a Execution",
18381902
"id": "RunEvaluationRequest",
@@ -2204,6 +2268,10 @@
22042268
],
22052269
"type": "string"
22062270
},
2271+
"isDrSite": {
2272+
"description": "Optional. Instance is part of a DR site.",
2273+
"type": "boolean"
2274+
},
22072275
"virtualHostname": {
22082276
"description": "Optional. A virtual hostname of the instance if it has one.",
22092277
"type": "string"

src/apis/workloadmanager/v1.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ export namespace workloadmanager_v1 {
293293
* The name of execution resource. The format is projects/{project\}/locations/{location\}/evaluations/{evaluation\}/executions/{execution\}
294294
*/
295295
name?: string | null;
296+
/**
297+
* Output only. execution result summary per rule
298+
*/
299+
ruleResults?: Schema$RuleExecutionResult[];
296300
/**
297301
* type represent whether the execution executed directly by user or scheduled according evaluation.schedule field.
298302
*/
@@ -330,6 +334,10 @@ export namespace workloadmanager_v1 {
330334
* The severity of violation.
331335
*/
332336
severity?: string | null;
337+
/**
338+
* Execution result type of the scanned resource
339+
*/
340+
type?: string | null;
333341
/**
334342
* The details of violation in an evaluation result.
335343
*/
@@ -742,6 +750,31 @@ export namespace workloadmanager_v1 {
742750
*/
743751
uri?: string | null;
744752
}
753+
/**
754+
* Message for execution result summary per rule
755+
*/
756+
export interface Schema$RuleExecutionResult {
757+
/**
758+
* Execution message, if any
759+
*/
760+
message?: string | null;
761+
/**
762+
* Number of violations
763+
*/
764+
resultCount?: string | null;
765+
/**
766+
* rule name
767+
*/
768+
rule?: string | null;
769+
/**
770+
* Number of total scanned resources
771+
*/
772+
scannedResourceCount?: string | null;
773+
/**
774+
* Output only. The execution status
775+
*/
776+
state?: string | null;
777+
}
745778
/**
746779
* Message for creating a Execution
747780
*/
@@ -965,6 +998,10 @@ export namespace workloadmanager_v1 {
965998
* Optional. Bitmask of instance role, a resource may have multiple roles at once.
966999
*/
9671000
instanceRole?: string | null;
1001+
/**
1002+
* Optional. Instance is part of a DR site.
1003+
*/
1004+
isDrSite?: boolean | null;
9681005
/**
9691006
* Optional. A virtual hostname of the instance if it has one.
9701007
*/

0 commit comments

Comments
 (0)