Skip to main content

host_security_reports

Creates, updates, deletes, gets or lists a host_security_reports resource.

Overview

Namehost_security_reports
TypeResource
Idgoogle.apigee.host_security_reports

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
createdstringCreation time of the query.
displayNamestringDisplay Name specified by the user.
envgroupHostnamestringHostname is available only when query is executed at host level.
errorstringError is set when query fails.
executionTimestringExecutionTime is available only after the query is completed.
queryParamsobjectContains information like metrics, dimenstions etc of the Security Report. (id: GoogleCloudApigeeV1SecurityReportMetadata)
reportDefinitionIdstringReport Definition ID.
resultobjectResult is available only after the query is completed. (id: GoogleCloudApigeeV1SecurityReportResultMetadata)
resultFileSizestringResultFileSize is available only after the query is completed.
resultRowsstring (int64)ResultRows is available only after the query is completed.
selfstringSelf link of the query. Example: /organizations/myorg/environments/myenv/securityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd or following format if query is running at host level: /organizations/myorg/hostSecurityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd
statestringQuery state could be "enqueued", "running", "completed", "expired" and "failed".
updatedstringOutput only. Last updated timestamp for the query.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_host_security_reports_getselectorganizationsId, hostSecurityReportsIdGet status of a query submitted at host level. If the query is still in progress, the state is set to "running" After the query has completed successfully, state is set to "completed"
organizations_host_security_reports_listselectorganizationsIdsubmittedBy, status, from, to, dataset, pageSize, pageToken, envgroupHostnameReturn a list of Security Reports at host level.
organizations_host_security_reports_createinsertorganizationsIdSubmit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the state of "enqueued" means that the request succeeded.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hostSecurityReportsIdstring
organizationsIdstring
datasetstring
envgroupHostnamestring
fromstring
pageSizeinteger (int32)
pageTokenstring
statusstring
submittedBystring
tostring

SELECT examples

Get status of a query submitted at host level. If the query is still in progress, the state is set to "running" After the query has completed successfully, state is set to "completed"

SELECT
created,
displayName,
envgroupHostname,
error,
executionTime,
queryParams,
reportDefinitionId,
result,
resultFileSize,
resultRows,
self,
state,
updated
FROM google.apigee.host_security_reports
WHERE organizationsId = '{{ organizationsId }}' -- required
AND hostSecurityReportsId = '{{ hostSecurityReportsId }}' -- required;

INSERT examples

Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the state of "enqueued" means that the request succeeded.

INSERT INTO google.apigee.host_security_reports (
data__metrics,
data__dimensions,
data__timeRange,
data__filter,
data__groupByTimeUnit,
data__limit,
data__mimeType,
data__csvDelimiter,
data__envgroupHostname,
data__reportDefinitionId,
data__displayName,
organizationsId
)
SELECT
'{{ metrics }}',
'{{ dimensions }}',
'{{ timeRange }}',
'{{ filter }}',
'{{ groupByTimeUnit }}',
{{ limit }},
'{{ mimeType }}',
'{{ csvDelimiter }}',
'{{ envgroupHostname }}',
'{{ reportDefinitionId }}',
'{{ displayName }}',
'{{ organizationsId }}'
RETURNING
created,
displayName,
envgroupHostname,
error,
executionTime,
queryParams,
reportDefinitionId,
result,
resultFileSize,
resultRows,
self,
state,
updated
;