sources
Creates, updates, deletes, gets or lists a sources
resource.
Overview
Name | sources |
Type | Resource |
Id | google.securitycenter.sources |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}" |
description | string | The description of the source (max of 1024 characters). Example: "Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated or insecure libraries." |
canonicalName | string | The canonical name of the finding source. It's either "organizations/{organization_id}/sources/{source_id}", "folders/{folder_id}/sources/{source_id}", or "projects/{project_number}/sources/{source_id}", depending on the closest CRM ancestor of the resource associated with the finding. |
displayName | string | The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive). |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
folders_sources_list | SELECT | foldersId | Lists all sources belonging to an organization. |
organizations_sources_get | SELECT | organizationsId, sourcesId | Gets a source. |
organizations_sources_list | SELECT | organizationsId | Lists all sources belonging to an organization. |
projects_sources_list | SELECT | projectsId | Lists all sources belonging to an organization. |
organizations_sources_create | INSERT | organizationsId | Creates a source. |
organizations_sources_patch | UPDATE | organizationsId, sourcesId | Updates a source. |
SELECT
examples
Lists all sources belonging to an organization.
SELECT
name,
description,
canonicalName,
displayName
FROM google.securitycenter.sources
WHERE foldersId = '{{ foldersId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sources
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.securitycenter.sources (
organizationsId,
name,
displayName,
description,
canonicalName
)
SELECT
'{{ organizationsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ canonicalName }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: canonicalName
value: string
UPDATE
example
Updates a sources
resource.
/*+ update */
UPDATE google.securitycenter.sources
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
canonicalName = '{{ canonicalName }}'
WHERE
organizationsId = '{{ organizationsId }}'
AND sourcesId = '{{ sourcesId }}';