Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

PolicySimulator

import { PolicySimulator } from "https://googleapis.deno.dev/v1/policysimulator:v1.ts";

Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. A Replay is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a Replay, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.

class PolicySimulator {
constructor(client?: CredentialsClient, baseUrl?: string);
async foldersLocationsOrgPolicyViolationsPreviewsOperationsGet(name: string): Promise<GoogleLongrunningOperation>;
async foldersLocationsReplaysCreate(parent: string, req: GoogleCloudPolicysimulatorV1Replay): Promise<GoogleLongrunningOperation>;
async foldersLocationsReplaysGet(name: string): Promise<GoogleCloudPolicysimulatorV1Replay>;
async foldersLocationsReplaysOperationsGet(name: string): Promise<GoogleLongrunningOperation>;
async foldersLocationsReplaysOperationsList(name: string, opts?: FoldersLocationsReplaysOperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>;
async foldersLocationsReplaysResultsList(parent: string, opts?: FoldersLocationsReplaysResultsListOptions): Promise<GoogleCloudPolicysimulatorV1ListReplayResultsResponse>;
async operationsGet(name: string): Promise<GoogleLongrunningOperation>;
async operationsList(name: string, opts?: OperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>;
async organizationsLocationsOrgPolicyViolationsPreviewsCreate(
parent: string,
): Promise<GoogleLongrunningOperation>;
async organizationsLocationsOrgPolicyViolationsPreviewsGet(name: string): Promise<GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview>;
async organizationsLocationsOrgPolicyViolationsPreviewsList(parent: string, opts?: OrganizationsLocationsOrgPolicyViolationsPreviewsListOptions): Promise<GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse>;
async organizationsLocationsOrgPolicyViolationsPreviewsOperationsGet(name: string): Promise<GoogleLongrunningOperation>;
async organizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsList(parent: string, opts?: OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListOptions): Promise<GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse>;
async organizationsLocationsReplaysCreate(parent: string, req: GoogleCloudPolicysimulatorV1Replay): Promise<GoogleLongrunningOperation>;
async organizationsLocationsReplaysGet(name: string): Promise<GoogleCloudPolicysimulatorV1Replay>;
async organizationsLocationsReplaysOperationsGet(name: string): Promise<GoogleLongrunningOperation>;
async organizationsLocationsReplaysOperationsList(name: string, opts?: OrganizationsLocationsReplaysOperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>;
async organizationsLocationsReplaysResultsList(parent: string, opts?: OrganizationsLocationsReplaysResultsListOptions): Promise<GoogleCloudPolicysimulatorV1ListReplayResultsResponse>;
async projectsLocationsOrgPolicyViolationsPreviewsOperationsGet(name: string): Promise<GoogleLongrunningOperation>;
async projectsLocationsReplaysCreate(parent: string, req: GoogleCloudPolicysimulatorV1Replay): Promise<GoogleLongrunningOperation>;
async projectsLocationsReplaysGet(name: string): Promise<GoogleCloudPolicysimulatorV1Replay>;
async projectsLocationsReplaysOperationsGet(name: string): Promise<GoogleLongrunningOperation>;
async projectsLocationsReplaysOperationsList(name: string, opts?: ProjectsLocationsReplaysOperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>;
async projectsLocationsReplaysResultsList(parent: string, opts?: ProjectsLocationsReplaysResultsListOptions): Promise<GoogleCloudPolicysimulatorV1ListReplayResultsResponse>;
}

§Constructors

§
new PolicySimulator(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
foldersLocationsOrgPolicyViolationsPreviewsOperationsGet(name: string): Promise<GoogleLongrunningOperation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
foldersLocationsReplaysCreate(parent: string, req: GoogleCloudPolicysimulatorV1Replay): Promise<GoogleLongrunningOperation>
[src]

Creates and starts a Replay using the given ReplayConfig.

@param parent

Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: projects/my-example-project/locations/global

§
foldersLocationsReplaysGet(name: string): Promise<GoogleCloudPolicysimulatorV1Replay>
[src]

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

@param name

Required. The name of the 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

§
foldersLocationsReplaysOperationsGet(name: string): Promise<GoogleLongrunningOperation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
foldersLocationsReplaysOperationsList(name: string, opts?: FoldersLocationsReplaysOperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
foldersLocationsReplaysResultsList(parent: string, opts?: FoldersLocationsReplaysResultsListOptions): Promise<GoogleCloudPolicysimulatorV1ListReplayResultsResponse>
[src]

Lists the results of running a Replay.

@param parent

Required. The 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

§
operationsGet(name: string): Promise<GoogleLongrunningOperation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
operationsList(name: string, opts?: OperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
organizationsLocationsOrgPolicyViolationsPreviewsCreate(parent: string, req: GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview, opts?: OrganizationsLocationsOrgPolicyViolationsPreviewsCreateOptions): Promise<GoogleLongrunningOperation>
[src]

CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this OrgPolicyOverlay. The resources to scan are inferred from these specified changes.

@param parent

Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: organizations/my-example-org/locations/global

§
organizationsLocationsOrgPolicyViolationsPreviewsGet(name: string): Promise<GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview>
[src]

GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.

@param name

Required. The name of the OrgPolicyViolationsPreview to get.

§
organizationsLocationsOrgPolicyViolationsPreviewsList(parent: string, opts?: OrganizationsLocationsOrgPolicyViolationsPreviewsListOptions): Promise<GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse>
[src]

ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.

@param parent

Required. The parent the violations are scoped to. Format: organizations/{organization}/locations/{location} Example: organizations/my-example-org/locations/global

§
organizationsLocationsOrgPolicyViolationsPreviewsOperationsGet(name: string): Promise<GoogleLongrunningOperation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
organizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsList(parent: string, opts?: OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListOptions): Promise<GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse>
[src]

ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.

@param parent

Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}

§
organizationsLocationsReplaysCreate(parent: string, req: GoogleCloudPolicysimulatorV1Replay): Promise<GoogleLongrunningOperation>
[src]

Creates and starts a Replay using the given ReplayConfig.

@param parent

Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: projects/my-example-project/locations/global

§
organizationsLocationsReplaysGet(name: string): Promise<GoogleCloudPolicysimulatorV1Replay>
[src]

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

@param name

Required. The name of the 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

§
organizationsLocationsReplaysOperationsGet(name: string): Promise<GoogleLongrunningOperation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
organizationsLocationsReplaysOperationsList(name: string, opts?: OrganizationsLocationsReplaysOperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
organizationsLocationsReplaysResultsList(parent: string, opts?: OrganizationsLocationsReplaysResultsListOptions): Promise<GoogleCloudPolicysimulatorV1ListReplayResultsResponse>
[src]

Lists the results of running a Replay.

@param parent

Required. The 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

§
projectsLocationsOrgPolicyViolationsPreviewsOperationsGet(name: string): Promise<GoogleLongrunningOperation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
projectsLocationsReplaysCreate(parent: string, req: GoogleCloudPolicysimulatorV1Replay): Promise<GoogleLongrunningOperation>
[src]

Creates and starts a Replay using the given ReplayConfig.

@param parent

Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: projects/my-example-project/locations/global

§
projectsLocationsReplaysGet(name: string): Promise<GoogleCloudPolicysimulatorV1Replay>
[src]

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

@param name

Required. The name of the 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

§
projectsLocationsReplaysOperationsGet(name: string): Promise<GoogleLongrunningOperation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
projectsLocationsReplaysOperationsList(name: string, opts?: ProjectsLocationsReplaysOperationsListOptions): Promise<GoogleLongrunningListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
projectsLocationsReplaysResultsList(parent: string, opts?: ProjectsLocationsReplaysResultsListOptions): Promise<GoogleCloudPolicysimulatorV1ListReplayResultsResponse>
[src]

Lists the results of running a Replay.

@param parent

Required. The 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