sources
Creates, updates, deletes, gets or lists a sources
resource.
Overview
Name | sources |
Type | Resource |
Id | google.securitycenter.sources |
Fields
The following fields are returned by SELECT
queries:
- organizations_sources_get
- folders_sources_list
- projects_sources_list
- organizations_sources_list
Successful response
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}" |
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. |
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." |
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). |
Successful response
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}" |
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. |
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." |
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). |
Successful response
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}" |
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. |
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." |
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). |
Successful response
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}" |
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. |
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." |
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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
organizations_sources_get | select | organizationsId , sourcesId | Gets a source. | |
folders_sources_list | select | foldersId | pageToken , pageSize | Lists all sources belonging to an organization. |
projects_sources_list | select | projectsId | pageToken , pageSize | Lists all sources belonging to an organization. |
organizations_sources_list | select | organizationsId | pageToken , pageSize | Lists all sources belonging to an organization. |
organizations_sources_create | insert | organizationsId | Creates a source. | |
organizations_sources_patch | update | organizationsId , sourcesId | updateMask | Updates a source. |
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.
Name | Datatype | Description |
---|---|---|
foldersId | string | |
organizationsId | string | |
projectsId | string | |
sourcesId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- organizations_sources_get
- folders_sources_list
- projects_sources_list
- organizations_sources_list
Gets a source.
SELECT
name,
canonicalName,
description,
displayName
FROM google.securitycenter.sources
WHERE organizationsId = '{{ organizationsId }}' -- required
AND sourcesId = '{{ sourcesId }}' -- required;
Lists all sources belonging to an organization.
SELECT
name,
canonicalName,
description,
displayName
FROM google.securitycenter.sources
WHERE foldersId = '{{ foldersId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lists all sources belonging to an organization.
SELECT
name,
canonicalName,
description,
displayName
FROM google.securitycenter.sources
WHERE projectsId = '{{ projectsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
Lists all sources belonging to an organization.
SELECT
name,
canonicalName,
description,
displayName
FROM google.securitycenter.sources
WHERE organizationsId = '{{ organizationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}';
INSERT
examples
- organizations_sources_create
- Manifest
Creates a source.
INSERT INTO google.securitycenter.sources (
data__name,
data__displayName,
data__description,
data__canonicalName,
organizationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ canonicalName }}',
'{{ organizationsId }}'
RETURNING
name,
canonicalName,
description,
displayName
;
# Description fields are for documentation purposes
- name: sources
props:
- name: organizationsId
value: string
description: Required parameter for the sources resource.
- name: name
value: string
description: >
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}"
- name: displayName
value: string
description: >
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).
- name: description
value: string
description: >
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."
- name: canonicalName
value: string
description: >
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.
UPDATE
examples
- organizations_sources_patch
Updates a source.
UPDATE google.securitycenter.sources
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__canonicalName = '{{ canonicalName }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND sourcesId = '{{ sourcesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
canonicalName,
description,
displayName;