Skip to main content

resource_value_configs

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

Overview

Nameresource_value_configs
TypeResource
Idgoogle.securitycenter.resource_value_configs

Fields

NameDatatypeDescription
namestringName for the resource value configuration
descriptionstringDescription of the resource value configuration.
cloudProviderstringCloud provider this configuration applies to
createTimestringOutput only. Timestamp this resource value configuration was created.
resourceLabelsSelectorobjectList of resource labels to search for, evaluated with AND. For example, "resource_labels_selector": {"key": "value", "env": "prod"} will match resources with labels "key": "value" AND "env": "prod" https://cloud.google.com/resource-manager/docs/creating-managing-labels
resourceTypestringApply resource_value only to resources that match resource_type. resource_type will be checked with AND of other resources. For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources.
resourceValuestringRequired. Resource value level this expression represents
scopestringProject or folder to scope this configuration to. For example, "project/456" would apply this configuration only to resources in "project/456" scope will be checked with AND of other resources.
sensitiveDataProtectionMappingobjectResource value mapping for Sensitive Data Protection findings. If any of these mappings have a resource value that is not unspecified, the resource_value field will be ignored when reading this configuration.
tagValuesarrayRequired. Tag values combined with AND to check against. Values in the form "tagValues/123" Example: [ "tagValues/123", "tagValues/456", "tagValues/789" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing
updateTimestringOutput only. Timestamp this resource value configuration was last updated.

Methods

NameAccessible byRequired ParamsDescription
organizations_resource_value_configs_getSELECTorganizationsId, resourceValueConfigsIdGets a ResourceValueConfig.
organizations_resource_value_configs_listSELECTorganizationsIdLists all ResourceValueConfigs.
organizations_resource_value_configs_batch_createINSERTorganizationsIdCreates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.
organizations_resource_value_configs_deleteDELETEorganizationsId, resourceValueConfigsIdDeletes a ResourceValueConfig.
organizations_resource_value_configs_patchUPDATEorganizationsId, resourceValueConfigsIdUpdates an existing ResourceValueConfigs with new rules.

SELECT examples

Lists all ResourceValueConfigs.

SELECT
name,
description,
cloudProvider,
createTime,
resourceLabelsSelector,
resourceType,
resourceValue,
scope,
sensitiveDataProtectionMapping,
tagValues,
updateTime
FROM google.securitycenter.resource_value_configs
WHERE organizationsId = '{{ organizationsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new resource_value_configs resource.

/*+ create */
INSERT INTO google.securitycenter.resource_value_configs (
organizationsId,
requests
)
SELECT
'{{ organizationsId }}',
'{{ requests }}'
;

UPDATE example

Updates a resource_value_configs resource.

/*+ update */
UPDATE google.securitycenter.resource_value_configs
SET
name = '{{ name }}',
resourceValue = '{{ resourceValue }}',
tagValues = '{{ tagValues }}',
resourceType = '{{ resourceType }}',
scope = '{{ scope }}',
resourceLabelsSelector = '{{ resourceLabelsSelector }}',
description = '{{ description }}',
cloudProvider = '{{ cloudProvider }}',
sensitiveDataProtectionMapping = '{{ sensitiveDataProtectionMapping }}'
WHERE
organizationsId = '{{ organizationsId }}'
AND resourceValueConfigsId = '{{ resourceValueConfigsId }}';

DELETE example

Deletes the specified resource_value_configs resource.

/*+ delete */
DELETE FROM google.securitycenter.resource_value_configs
WHERE organizationsId = '{{ organizationsId }}'
AND resourceValueConfigsId = '{{ resourceValueConfigsId }}';