Skip to main content

replays

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

Overview​

Namereplays
TypeResource
Idgoogle.policysimulator.replays

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The resource name of the Replay, which has the following format: {projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}, where {resource-id} is the ID of the project, folder, or organization that owns the Replay. Example: projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36
configobjectRequired. The configuration used for the Replay. (id: GoogleCloudPolicysimulatorV1ReplayConfig)
resultsSummaryobjectOutput only. Summary statistics about the replayed log entries. (id: GoogleCloudPolicysimulatorV1ReplayResultsSummary)
statestringOutput only. The current state of the Replay. (STATE_UNSPECIFIED, PENDING, RUNNING, SUCCEEDED, FAILED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
folders_locations_replays_getselectfoldersId, locationsId, replaysIdGets the specified Replay. Each Replay is available for at least 7 days.
organizations_locations_replays_getselectorganizationsId, locationsId, replaysIdGets the specified Replay. Each Replay is available for at least 7 days.
projects_locations_replays_getselectprojectsId, locationsId, replaysIdGets the specified Replay. Each Replay is available for at least 7 days.
folders_locations_replays_createinsertfoldersId, locationsIdCreates and starts a Replay using the given ReplayConfig.
organizations_locations_replays_createinsertorganizationsId, locationsIdCreates and starts a Replay using the given ReplayConfig.
projects_locations_replays_createinsertprojectsId, locationsIdCreates and starts a Replay using the given ReplayConfig.

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
foldersIdstring
locationsIdstring
organizationsIdstring
projectsIdstring
replaysIdstring

SELECT examples​

Gets the specified Replay. Each Replay is available for at least 7 days.

SELECT
name,
config,
resultsSummary,
state
FROM google.policysimulator.replays
WHERE foldersId = '{{ foldersId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND replaysId = '{{ replaysId }}' -- required
;

INSERT examples​

Creates and starts a Replay using the given ReplayConfig.

INSERT INTO google.policysimulator.replays (
data__config,
foldersId,
locationsId
)
SELECT
'{{ config }}',
'{{ foldersId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;