Service Client: Google::Cloud::Policysimulator::V1::Simulator::SimulatorClient
Client stub representing the remote Simulator gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to policysimulator.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Policysimulator::V1::Simulator - Compiled Protocol Buffers messages for google/cloud/policysimulator/v1/simulator.proto
SYNOPSIS
use Google::Cloud::Policysimulator::V1::Simulator;
my $msg = Google::Cloud::Policysimulator::V1::Simulator::Replay->new({
name => $name,
state => $state,
config => $config,
results_summary => $results_summary,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Policysimulator::V1::Simulator::Replay->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/policysimulator/v1/simulator.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Policysimulator::V1::Simulator::Replay
A resource describing a `Replay`, or simulation.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput 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`
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Policysimulator::V1::Replay::State)Output only. The current state of the `Replay`.
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::ReplayConfig)Required. The configuration used for the `Replay`.
$msg->results_summary()/$msg->results_summary($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::Replay::ResultsSummary)Output only. Summary statistics about the replayed log entries.
Enum: Replay::State
STATE_UNSPECIFIED=>0PENDING=>1RUNNING=>2SUCCEEDED=>3FAILED=>4
Google::Cloud::Policysimulator::V1::Simulator::ReplayResult
The result of replaying a single access tuple against a simulated state.
Inherits from Protobuf::Message.
Accessors
$msg->diff()/$msg->diff($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::ReplayDiff)The difference between the principal's access under the current (baseline) policies and the principal's access under the proposed (simulated) policies.
This field is only included for access tuples that were successfully replayed and had different results under the current policies and the proposed policies.
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)The error that caused the access tuple replay to fail.
This field is only included for access tuples that were not replayed successfully.
$msg->name()/$msg->name($value)Type:
StringThe resource name of the `ReplayResult`, in the following format:
`{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the [Replay][google.cloud.policysimulator.v1.Replay].
Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`
$msg->parent()/$msg->parent($value)Type:
StringThe [Replay][google.cloud.policysimulator.v1.Replay] that the access tuple was included in.
$msg->access_tuple()/$msg->access_tuple($value)Type:
Message(Google::Cloud::Policysimulator::V1::Explanations::AccessTuple)The access tuple that was replayed. This field includes information about the principal, resource, and permission that were involved in the access attempt.
$msg->last_seen_date()/$msg->last_seen_date($value)Type:
Message(Google::Type::Date::Date)The latest date this access tuple was seen in the logs.
Google::Cloud::Policysimulator::V1::Simulator::CreateReplayRequest
Request message for [Simulator.CreateReplay][google.cloud.policysimulator.v1.Simulator.CreateReplay].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The parent resource where this [Replay][google.cloud.policysimulator.v1.Replay] will be created. This resource must be a project, folder, or organization with a location.
Example: `projects/my-example-project/locations/global`
$msg->replay()/$msg->replay($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::Replay)Required. The [Replay][google.cloud.policysimulator.v1.Replay] to create. Set `Replay.ReplayConfig` to configure the replay.
Google::Cloud::Policysimulator::V1::Simulator::ReplayOperationMetadata
Metadata about a Replay operation.
Inherits from Protobuf::Message.
Accessors
$msg->start_time()/$msg->start_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time when the request was received.
Google::Cloud::Policysimulator::V1::Simulator::GetReplayRequest
Request message for [Simulator.GetReplay][google.cloud.policysimulator.v1.Simulator.GetReplay].
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the [Replay][google.cloud.policysimulator.v1.Replay] to retrieve, in 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`
Google::Cloud::Policysimulator::V1::Simulator::ListReplayResultsRequest
Request message for [Simulator.ListReplayResults][google.cloud.policysimulator.v1.Simulator.ListReplayResults].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The [Replay][google.cloud.policysimulator.v1.Replay] whose results are listed, in the following format:
`{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`
Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of [ReplayResult][google.cloud.policysimulator.v1.ReplayResult] objects to return. Defaults to 5000.
The maximum value is 5000; values above 5000 are rounded down to 5000.
$msg->page_token()/$msg->page_token($value)Type:
StringA page token, received from a previous [Simulator.ListReplayResults][google.cloud.policysimulator.v1.Simulator.ListReplayResults] call. Provide this token to retrieve the next page of results.
When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.
Google::Cloud::Policysimulator::V1::Simulator::ListReplayResultsResponse
Response message for [Simulator.ListReplayResults][google.cloud.policysimulator.v1.Simulator.ListReplayResults].
Inherits from Protobuf::Message.
Accessors
$msg->replay_results()/$msg->replay_results($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::ReplayResult)The results of running a [Replay][google.cloud.policysimulator.v1.Replay].
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA token that you can use to retrieve the next page of [ReplayResult][google.cloud.policysimulator.v1.ReplayResult] objects. If this field is omitted, there are no subsequent pages.
Google::Cloud::Policysimulator::V1::Simulator::ReplayConfig
The configuration used for a [Replay][google.cloud.policysimulator.v1.Replay].
Inherits from Protobuf::Message.
Accessors
$msg->policy_overlay()/$msg->policy_overlay($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::ReplayConfig::PolicyOverlayEntry)A mapping of the resources that you want to simulate policies for and the policies that you want to simulate.
Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
Values are [Policy][google.iam.v1.Policy] objects representing the policies that you want to simulate.
Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.
$msg->log_source()/$msg->log_source($value)Type:
Enum(Google::Cloud::Policysimulator::V1::ReplayConfig::LogSource)The logs to use as input for the [Replay][google.cloud.policysimulator.v1.Replay].
Enum: ReplayConfig::LogSource
LOG_SOURCE_UNSPECIFIED=>0RECENT_ACCESSES=>1
Google::Cloud::Policysimulator::V1::Simulator::ReplayDiff
The difference between the results of evaluating an access tuple under the current (baseline) policies and under the proposed (simulated) policies. This difference explains how a principal's access could change if the proposed policies were applied.
Inherits from Protobuf::Message.
Accessors
$msg->access_diff()/$msg->access_diff($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::AccessStateDiff)A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.
The evaluation of the principal's access is reported in the [AccessState][google.cloud.policysimulator.v1.AccessState] field.
Google::Cloud::Policysimulator::V1::Simulator::AccessStateDiff
A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.
Inherits from Protobuf::Message.
Accessors
$msg->baseline()/$msg->baseline($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::ExplainedAccess)The results of evaluating the access tuple under the current (baseline) policies.
If the [AccessState][google.cloud.policysimulator.v1.AccessState] couldn't be fully evaluated, this field explains why.
$msg->simulated()/$msg->simulated($value)Type:
Message(Google::Cloud::Policysimulator::V1::Simulator::ExplainedAccess)The results of evaluating the access tuple under the proposed (simulated) policies.
If the AccessState couldn't be fully evaluated, this field explains why.
$msg->access_change()/$msg->access_change($value)Type:
Enum(Google::Cloud::Policysimulator::V1::AccessStateDiff::AccessChangeType)How the principal's access, specified in the AccessState field, changed between the current (baseline) policies and proposed (simulated) policies.
Enum: AccessStateDiff::AccessChangeType
ACCESS_CHANGE_TYPE_UNSPECIFIED=>0NO_CHANGE=>1UNKNOWN_CHANGE=>2ACCESS_REVOKED=>3ACCESS_GAINED=>4ACCESS_MAYBE_REVOKED=>5ACCESS_MAYBE_GAINED=>6
Google::Cloud::Policysimulator::V1::Simulator::ExplainedAccess
Details about how a set of policies, listed in [ExplainedPolicy][google.cloud.policysimulator.v1.ExplainedPolicy], resulted in a certain [AccessState][google.cloud.policysimulator.v1.AccessState] when replaying an access tuple.
Inherits from Protobuf::Message.
Accessors
$msg->access_state()/$msg->access_state($value)Type:
Enum(Google::Cloud::Policysimulator::V1::AccessState)Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.
$msg->policies()/$msg->policies($value)Type:
Message(Google::Cloud::Policysimulator::V1::Explanations::ExplainedPolicy)If the [AccessState][google.cloud.policysimulator.v1.AccessState] is `UNKNOWN`, this field contains the policies that led to that result.
If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.
$msg->errors()/$msg->errors($value)Type:
Message(Google::Rpc::Status::Status)If the [AccessState][google.cloud.policysimulator.v1.AccessState] is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`.
If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Policysimulator::V1::Simulator::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.