// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Workload Manager API Client for Deno * ==================================== * * Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. * * Docs: https://cloud.google.com/workload-manager/docs * Source: https://googleapis.deno.dev/v1/workloadmanager:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * Workload Manager is a service that provides tooling for enterprise workloads * to automate the deployment and validation of your workloads against best * practices and recommendations. */ export class WorkloadManager { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://workloadmanager.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Creates a new actuation for an existing Deployment. * * @param parent Required. The resource name of the Actuation location using the form: 'projects/{project_id}/locations/{location}/deployments/{deployment}' */ async projectsLocationsDeploymentsActuationsCreate(parent: string, req: Actuation, opts: ProjectsLocationsDeploymentsActuationsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/actuations`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Actuation * * @param name Required. The name of the book to delete. project/{project_id}/locations/{location_id}/deployments/{deployment_id}/actuations/{actuation_id} */ async projectsLocationsDeploymentsActuationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single Actuation. * * @param name Required. Name of the resource */ async projectsLocationsDeploymentsActuationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Actuation; } /** * Lists Actuations in a given project, location and deployment. * * @param parent Required. The resource prefix of the Actuation using the form: 'projects/{project_id}/locations/{location}/deployments/{deployment}' */ async projectsLocationsDeploymentsActuationsList(parent: string, opts: ProjectsLocationsDeploymentsActuationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/actuations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListActuationsResponse; } /** * Creates a new Deployment in a given project and location. * * @param parent Required. The resource prefix of the Deployment using the form: `projects/{project_id}/locations/{location_id}` */ async projectsLocationsDeploymentsCreate(parent: string, req: Deployment, opts: ProjectsLocationsDeploymentsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/deployments`); if (opts.deploymentId !== undefined) { url.searchParams.append("deploymentId", String(opts.deploymentId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Deployment. * * @param name Required. Name of the resource */ async projectsLocationsDeploymentsDelete(name: string, opts: ProjectsLocationsDeploymentsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single Deployment. * * @param name Required. Name of the resource. The format will be 'projects/{project_id}/locations/{location_id}/deployments/{deployment_id}' */ async projectsLocationsDeploymentsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Deployment; } /** * Lists Deployments in a given project and location. * * @param parent Required. The resource prefix of the Deployment using the form: `projects/{project_id}/locations/{location_id}` */ async projectsLocationsDeploymentsList(parent: string, opts: ProjectsLocationsDeploymentsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/deployments`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDeploymentsResponse; } /** * Gets details of a discovered workload profile. * * @param name Required. Name of the resource */ async projectsLocationsDiscoveredprofilesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeWorkloadProfile(data); } /** * Get the health of a discovered workload profile. * * @param name Required. The resource name */ async projectsLocationsDiscoveredprofilesHealthGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeWorkloadProfileHealth(data); } /** * List discovered workload profiles * * @param parent Required. Parent value for ListDiscoveredProfilesRequest */ async projectsLocationsDiscoveredprofilesList(parent: string, opts: ProjectsLocationsDiscoveredprofilesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/discoveredprofiles`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListDiscoveredProfilesResponse; } /** * Creates a new Evaluation in a given project and location. * * @param parent Required. The resource prefix of the evaluation location using the form: `projects/{project_id}/locations/{location_id}` */ async projectsLocationsEvaluationsCreate(parent: string, req: Evaluation, opts: ProjectsLocationsEvaluationsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/evaluations`); if (opts.evaluationId !== undefined) { url.searchParams.append("evaluationId", String(opts.evaluationId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Evaluation. * * @param name Required. Name of the resource */ async projectsLocationsEvaluationsDelete(name: string, opts: ProjectsLocationsEvaluationsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Deletes a single Execution. * * @param name Required. Name of the resource */ async projectsLocationsEvaluationsExecutionsDelete(name: string, opts: ProjectsLocationsEvaluationsExecutionsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single Execution. * * @param name Required. Name of the resource */ async projectsLocationsEvaluationsExecutionsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Execution; } /** * Lists Executions in a given project and location. * * @param parent Required. The resource prefix of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}' */ async projectsLocationsEvaluationsExecutionsList(parent: string, opts: ProjectsLocationsEvaluationsExecutionsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/executions`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListExecutionsResponse; } /** * Lists the result of a single evaluation. * * @param parent Required. The execution results. Format: {parent}/evaluations/*/executions/*/results */ async projectsLocationsEvaluationsExecutionsResultsList(parent: string, opts: ProjectsLocationsEvaluationsExecutionsResultsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/results`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListExecutionResultsResponse; } /** * Creates a new Execution in a given project and location. * * @param name Required. The resource name of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}' */ async projectsLocationsEvaluationsExecutionsRun(name: string, req: RunEvaluationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/executions:run`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * List all scanned resources for a single Execution. * * @param parent Required. parent for ListScannedResourcesRequest */ async projectsLocationsEvaluationsExecutionsScannedResourcesList(parent: string, opts: ProjectsLocationsEvaluationsExecutionsScannedResourcesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/scannedResources`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.rule !== undefined) { url.searchParams.append("rule", String(opts.rule)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListScannedResourcesResponse; } /** * Gets details of a single Evaluation. * * @param name Required. Name of the resource */ async projectsLocationsEvaluationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Evaluation; } /** * Lists Evaluations in a given project and location. * * @param parent Required. Parent value for ListEvaluationsRequest */ async projectsLocationsEvaluationsList(parent: string, opts: ProjectsLocationsEvaluationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/evaluations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListEvaluationsResponse; } /** * Updates the parameters of a single Evaluation. * * @param name name of resource names have the form 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}' */ async projectsLocationsEvaluationsPatch(name: string, req: Evaluation, opts: ProjectsLocationsEvaluationsPatchOptions = {}): Promise { opts = serializeProjectsLocationsEvaluationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Location; } /** * Delete the data insights from workload manager data warehouse. * * @param name Required. The system id of the SAP system resource to delete. Formatted as projects/{project}/locations/{location}/sapSystems/{sap_system_id} */ async projectsLocationsInsightsDelete(name: string, opts: ProjectsLocationsInsightsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Write the data insights to workload manager data warehouse. * * @param location Required. The GCP location. The format is: projects/{project}/locations/{location}. */ async projectsLocationsInsightsWriteInsight(location: string, req: WriteInsightRequest): Promise { req = serializeWriteInsightRequest(req); const url = new URL(`${this.#baseUrl}v1/${ location }/insights:writeInsight`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as WriteInsightResponse; } /** * Lists information about the supported locations for this service. This * method can be called in two ways: * **List all public locations:** Use the * path `GET /v1/locations`. * **List project-visible locations:** Use the * path `GET /v1/projects/{project_id}/locations`. This may include public * locations as well as private or other locations specifically visible to the * project. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/locations`); if (opts.extraLocationTypes !== undefined) { url.searchParams.append("extraLocationTypes", String(opts.extraLocationTypes)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListLocationsResponse; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * 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. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * 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. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Lists rules in a given project. * * @param parent Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions */ async projectsLocationsRulesList(parent: string, opts: ProjectsLocationsRulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/rules`); if (opts.customRulesBucket !== undefined) { url.searchParams.append("customRulesBucket", String(opts.customRulesBucket)); } if (opts.evaluationType !== undefined) { url.searchParams.append("evaluationType", String(opts.evaluationType)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListRulesResponse; } } /** * Active directory details */ export interface ActiveDirectory { /** * Optional. DNS IP address */ dnsAddress?: string; /** * Optional. human readable form of a domain such as “google.com”. */ domain?: string; /** * Optional. domain username */ domainUsername?: string; /** * Required. secret_manager_secret */ secretManagerSecret?: string; /** * Required. active directory type */ type?: | "ACTIVE_DIRECTORY_TYPE_UNSPECIFIED" | "GCP_MANAGED" | "SELF_MANAGED"; } /** * The Actuation object represents the bootstrap state and output results of * deployed infrastructure and software. */ export interface Actuation { /** * Output only. [Output only] Actuation output */ readonly actuationOutput?: ActuationOutput; /** * Output only. [Output only] Deployment output */ readonly deploymentOutput?: DeploymentOutput[]; /** * Output only. [Output only] End time stamp */ readonly endTime?: Date; /** * The name of actuation resource. The format is * projects/{project}/locations/{location}/deployments/{deployment}/actuations/{actuation} */ name?: string; /** * Output only. [Output only] Start time stamp */ readonly startTime?: Date; /** * Output only. [Output only] Actuation state */ readonly state?: | "STATE_UNSPECIFIED" | "INFRA_CREATING" | "SUCCEEDED" | "FAILED" | "POST_INFRA_CONFIGURING" | "INFRA_DESTROYING" | "TIMEOUT"; } /** * Message for output of Actuation */ export interface ActuationOutput { /** * A link to gcs file that store build logs */ actuateLogs?: string; /** * Output only. error message return from ansible. */ readonly ansibleError?: string; /** * Output only. failed task name return from ansible. */ readonly ansibleFailedTask?: string[]; /** * reference to Blueprint Controller deployment and revision resource */ blueprintId?: string; /** * Cloud Build instance UUID associated with this revision, without any * suffix or prefix */ cloudbuildId?: string; /** * Output only. Code describing any errors that may have occurred. If not * specified, there is no error in actuation. */ readonly errorCode?: | "ERROR_CODE_UNSPECIFIED" | "TERRAFORM_FAILED" | "PERMISSION_DENIED_IN_TERRAFORM" | "QUOTA_EXCEED_IN_TERRAFORM" | "ANSIBLE_FAILED" | "CONSTRAINT_VIOLATION_IN_TERRAFORM" | "RESOURCE_ALREADY_EXISTS_IN_TERRAFORM" | "RESOURCE_UNAVAILABLE_IN_TERRAFORM" | "PERMISSION_DENIED_IN_ANSIBLE" | "INVALID_SECRET_IN_ANSIBLE" | "TERRAFORM_DELETION_FAILED" | "RESOURCE_IN_USE_IN_TERRAFORM_DELETION" | "ANSIBLE_START_FAILED"; /** * A link to actuation cloud build log. */ errorLogs?: string; /** * Output only. whether the error message is user facing. If true, the error * message will be shown in the UI. */ readonly hasUserFacingErrorMsg?: boolean; /** * Output only. error message return from terraform. */ readonly terraformError?: string; /** * reference to terraform template used */ terraformTemplate?: string; } /** * * An AgentCommand specifies a one-time executable program for the agent to * run. */ export interface AgentCommand { /** * command is the name of the agent one-time executable that will be invoked. */ command?: string; /** * parameters is a map of key/value pairs that can be used to specify * additional one-time executable settings. */ parameters?: { [key: string]: string }; } /** * Agent status. */ export interface AgentStates { /** * Optional. The available version of the agent in artifact registry. */ availableVersion?: string; /** * Optional. HANA monitoring metrics of the agent. */ hanaMonitoring?: ServiceStates; /** * Optional. The installed version of the agent on the host. */ installedVersion?: string; /** * Optional. Whether the agent is fully enabled. If false, the agent is has * some issues. */ isFullyEnabled?: boolean; /** * Optional. The Process metrics of the agent. */ processMetrics?: ServiceStates; /** * Optional. The System discovery metrics of the agent. */ systemDiscovery?: ServiceStates; } /** * The schema of agent status data. */ export interface AgentStatus { /** * Output only. The name of the agent. */ readonly agentName?: string; /** * Output only. The available version of the agent in artifact registry. */ readonly availableVersion?: string; /** * Output only. Whether the agent has full access to Cloud APIs. */ readonly cloudApiAccessFullScopesGranted?: | "UNSPECIFIED_STATE" | "SUCCESS_STATE" | "FAILURE_STATE" | "ERROR_STATE"; /** * Output only. The error message for the agent configuration if invalid. */ readonly configurationErrorMessage?: string; /** * Output only. The path to the agent configuration file. */ readonly configurationFilePath?: string; /** * Output only. Whether the agent configuration is valid. */ readonly configurationValid?: | "UNSPECIFIED_STATE" | "SUCCESS_STATE" | "FAILURE_STATE" | "ERROR_STATE"; /** * Output only. The installed version of the agent on the host. */ readonly installedVersion?: string; /** * Output only. The URI of the instance. Format: projects//zones//instances/ */ readonly instanceUri?: string; /** * Output only. The kernel version of the system. */ readonly kernelVersion?: SapDiscoveryResourceInstancePropertiesKernelVersion; /** * Output only. Optional references to public documentation. */ readonly references?: AgentStatusReference[]; /** * Output only. The services (process metrics, host metrics, etc.). */ readonly services?: AgentStatusServiceStatus[]; /** * Output only. Whether the agent service is enabled in systemd. */ readonly systemdServiceEnabled?: | "UNSPECIFIED_STATE" | "SUCCESS_STATE" | "FAILURE_STATE" | "ERROR_STATE"; /** * Output only. Whether the agent service is running in systemd. */ readonly systemdServiceRunning?: | "UNSPECIFIED_STATE" | "SUCCESS_STATE" | "FAILURE_STATE" | "ERROR_STATE"; } /** * The configuration value. */ export interface AgentStatusConfigValue { /** * Output only. Whether the configuration value is the default value or * overridden. */ readonly isDefault?: boolean; /** * Output only. The name of the configuration value. */ readonly name?: string; /** * Output only. The value of the configuration value. */ readonly value?: string; } /** * The IAM permission status. */ export interface AgentStatusIAMPermission { /** * Output only. Whether the permission is granted. */ readonly granted?: | "UNSPECIFIED_STATE" | "SUCCESS_STATE" | "FAILURE_STATE" | "ERROR_STATE"; /** * Output only. The name of the permission. */ readonly name?: string; } /** * The reference to public documentation. */ export interface AgentStatusReference { /** * Output only. The name of the reference. */ readonly name?: string; /** * Output only. The URL of the reference. */ readonly url?: string; } /** * The status of a service (process metrics, host metrics, etc.). */ export interface AgentStatusServiceStatus { /** * Output only. The configuration values for the service. */ readonly configValues?: AgentStatusConfigValue[]; /** * Output only. The error message for the service if it is not fully * functional. */ readonly errorMessage?: string; /** * Output only. Whether the service is fully functional (all checks passed). */ readonly fullyFunctional?: | "UNSPECIFIED_STATE" | "SUCCESS_STATE" | "FAILURE_STATE" | "ERROR_STATE"; /** * Output only. The permissions required for the service. */ readonly iamPermissions?: AgentStatusIAMPermission[]; /** * Output only. The name of the service. */ readonly name?: string; /** * Output only. The state of the service (enabled or disabled in the * configuration). */ readonly state?: | "UNSPECIFIED_STATE" | "SUCCESS_STATE" | "FAILURE_STATE" | "ERROR_STATE"; /** * Output only. The message to display when the service state is unspecified. */ readonly unspecifiedStateMessage?: string; } /** * Message for sap instant details */ export interface AppDetails { /** * Optional. instance id for app */ appInstanceId?: string; /** * Application service account - let custoemrs bring their own SA for * application */ appServiceAccount?: string; /** * Optional. Customized vm names */ appVmNames?: string[]; /** * Required. image for ascs server */ ascsImage?: string; /** * Optional. instance id for ascs */ ascsInstanceId?: string; /** * Required. ascs_machine_type */ ascsMachineType?: string; /** * ASCS service account - let custoemrs bring their own SA for ASCS */ ascsServiceAccount?: string; /** * Optional. ASCS vm name */ ascsVm?: string; /** * Optional. instance id for ers */ ersInstanceId?: string; /** * Optional. ERS vm name */ ersVm?: string; /** * Required. image for app server and ascs server */ image?: string; /** * Required. machine type */ machineType?: string; /** * Required. secret_manager_secret */ secretManagerSecret?: string; /** * Optional. Storage location */ sharedStorage?: string; /** * Required. The SAP SID is a three-digit server-specific unique * identification code. */ sid?: string; /** * Required. vms_multiplier */ vmsMultiplier?: number; } /** * Backup properties. */ export interface BackupProperties { /** * Output only. The state of the latest backup. */ readonly latestBackupStatus?: | "BACKUP_STATE_UNSPECIFIED" | "BACKUP_STATE_SUCCESS" | "BACKUP_STATE_FAILURE"; /** * The time when the latest backup was performed. */ latestBackupTime?: Date; } function serializeBackupProperties(data: any): BackupProperties { return { ...data, latestBackupTime: data["latestBackupTime"] !== undefined ? data["latestBackupTime"].toISOString() : undefined, }; } function deserializeBackupProperties(data: any): BackupProperties { return { ...data, latestBackupTime: data["latestBackupTime"] !== undefined ? new Date(data["latestBackupTime"]) : undefined, }; } /** * Message describing big query destination */ export interface BigQueryDestination { /** * Optional. determine if results will be saved in a new table */ createNewResultsTable?: boolean; /** * Optional. destination dataset to save evaluation results */ destinationDataset?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * The resource on GCP */ export interface CloudResource { /** * Output only. All instance properties. */ readonly instanceProperties?: InstanceProperties; /** * Output only. */ readonly kind?: | "RESOURCE_KIND_UNSPECIFIED" | "RESOURCE_KIND_INSTANCE" | "RESOURCE_KIND_DISK" | "RESOURCE_KIND_ADDRESS" | "RESOURCE_KIND_FILESTORE" | "RESOURCE_KIND_HEALTH_CHECK" | "RESOURCE_KIND_FORWARDING_RULE" | "RESOURCE_KIND_BACKEND_SERVICE" | "RESOURCE_KIND_SUBNETWORK" | "RESOURCE_KIND_NETWORK" | "RESOURCE_KIND_PUBLIC_ADDRESS" | "RESOURCE_KIND_INSTANCE_GROUP"; /** * Output only. resource name Example: * compute.googleapis.com/projects/wlm-obs-dev/zones/us-central1-a/instances/sap-pri */ readonly name?: string; } /** * * Command specifies the type of command to execute. */ export interface Command { /** * AgentCommand specifies a one-time executable program for the agent to run. */ agentCommand?: AgentCommand; /** * ShellCommand is invoked via the agent's command line executor. */ shellCommand?: ShellCommand; } /** * HealthCondition contains the detailed health check of each component. */ export interface ComponentHealth { /** * The component of a workload. */ component?: string; /** * The detailed health checks of the component. */ componentHealthChecks?: HealthCheck[]; /** * Output only. The type of the component health. */ readonly componentHealthType?: | "TYPE_UNSPECIFIED" | "TYPE_REQUIRED" | "TYPE_OPTIONAL" | "TYPE_SPECIAL"; /** * Output only. The health state of the component. */ readonly state?: | "HEALTH_STATE_UNSPECIFIED" | "HEALTHY" | "UNHEALTHY" | "CRITICAL" | "UNSUPPORTED"; /** * Sub component health. */ subComponentsHealth?: ComponentHealth[]; } /** * Database details */ export interface Database { /** * Required. disk_type */ diskType?: string; /** * Optional. only useful for Linux High Availability setup */ floatingIpAddress?: string; /** * Required. machine type */ machineType?: string; /** * Optional. the name of a secondary-sole-tenant node/node group */ secondarySoleTenantNode?: string; /** * Optional. the type of a secondary-sole-tenant node/node group e.g. * compute.googleapis.com/node-name */ secondarySoleTenantNodeType?: string; /** * Required. secret_manager_secret */ secretManagerSecret?: string; /** * Required. whether simultaneous multithreading is enabled or not */ smt?: boolean; /** * Optional. the name of a primary sole-tenant node/node group */ soleTenantNode?: string; /** * Optional. the type of a primary sole-tenant node/node group e.g. * compute.googleapis.com/node-name */ soleTenantNodeType?: string; /** * Required. whether to have TempDB on local SSD */ tempdbOnSsd?: boolean; /** * Required. SHARED or SOLE_TENANT */ tenancyModel?: | "TENANCY_MODEL_UNSPECIFIED" | "SHARED" | "SOLE_TENANT"; } /** * Message for sap instant details */ export interface DatabaseDetails { /** * Database service account - let custoemrs bring their own SA for database */ databaseServiceAccount?: string; /** * Required. disk_type */ diskType?: string; /** * Required. image for database server */ image?: string; /** * Optional. instance id */ instanceId?: string; /** * Required. machine type */ machineType?: string; /** * Optional. primary db vm name */ primaryDbVm?: string; /** * Optional. secondary db vm name */ secondaryDbVm?: string; /** * Required. secret_manager_secret */ secretManagerSecret?: string; /** * Required. The SID is a three-digit server-specific unique identification * code. */ sid?: string; } /** * Database Properties. */ export interface DatabaseProperties { /** * Output only. Backup properties. */ readonly backupProperties?: BackupProperties; /** * Output only. Type of the database. `HANA`, `DB2`, etc. */ readonly databaseType?: | "DATABASE_TYPE_UNSPECIFIED" | "HANA" | "MAX_DB" | "DB2" | "ORACLE" | "SQLSERVER" | "ASE"; } /** * The Deployment object represents user intent for deploying a specific type * of workload. */ export interface Deployment { /** * Output only. [Output only] Create time stamp */ readonly createTime?: Date; /** * Description of the Deployment */ description?: string; /** * The name of deployment resource. The format will be * 'projects/{project_id}/locations/{location_id}/deployments/{deployment_id}' */ name?: string; /** * SAP system workload input */ sapSystemS4Config?: SapSystemS4Config; /** * User-specified Service Account (SA) credentials to be used for cloud build * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` The default * Cloud Build SA will be used initially if this field is not set during * deployment creation */ serviceAccount?: string; /** * MS SQL workload input */ sqlServerWorkload?: SqlServerWorkload; /** * Output only. Current state of the deployment. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "UPDATING" | "DELETING" | "FAILED"; /** * Optional. terraform_variables represents all the Terraform variables for * the deployment workload. The key is the name of the Terraform variable, and * the value is the TerraformVariable. For example: { "project_id": { * "input_value": { "string_value": "my-project-id" } }, "zone": { * "input_value": { "string_value": "us-central1-a" } } } */ terraformVariables?: { [key: string]: TerraformVariable }; /** * Output only. [Output only] Update time stamp */ readonly updateTime?: Date; /** * Optional. The user-specified Cloud Build worker pool resource in which the * Cloud Build job will execute. Format: * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. If * this field is unspecified, the default Cloud Build worker pool will be * used. */ workerPool?: string; /** * Optional. Workload type of the deployment */ workloadType?: | "WORKLOAD_TYPE_UNSPECIFIED" | "SAP_S4" | "SQL_SERVER" | "ORACLE"; } /** * Message for output of deployment resource */ export interface DeploymentOutput { /** * name of the resource */ name?: string; /** * type of the resource */ type?: string; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface Empty { } /** * Message describing Evaluation object */ export interface Evaluation { /** * Optional. BigQuery destination */ bigQueryDestination?: BigQueryDestination; /** * Output only. [Output only] Create time stamp */ readonly createTime?: Date; /** * The Cloud Storage bucket name for custom rules. */ customRulesBucket?: string; /** * Description of the Evaluation */ description?: string; /** * Evaluation type */ evaluationType?: | "EVALUATION_TYPE_UNSPECIFIED" | "SAP" | "SQL_SERVER" | "OTHER" | "SCC_IAC"; /** * Optional. Immutable. Customer-managed encryption key name, in the format * projects/*\/locations/*\/keyRings/*\/cryptoKeys/*. */ kmsKey?: string; /** * Labels as key value pairs */ labels?: { [key: string]: string }; /** * name of resource names have the form * 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}' */ name?: string; /** * annotations as key value pairs */ resourceFilter?: ResourceFilter; /** * Output only. [Output only] The updated rule ids if exist. */ readonly resourceStatus?: ResourceStatus; /** * the name of the rule */ ruleNames?: string[]; /** * Output only. [Output only] The updated rule ids if exist. */ readonly ruleVersions?: string[]; /** * crontab format schedule for scheduled evaluation, currently only support * the following schedule: "0 *\/1 * * *", "0 *\/6 * * *", "0 *\/12 * * *", "0 * 0 *\/1 * *", "0 0 *\/7 * *", */ schedule?: string; /** * Output only. [Output only] Update time stamp */ readonly updateTime?: Date; } /** * Message describing Execution object */ export interface Execution { /** * Output only. [Output only] End time stamp */ readonly endTime?: Date; /** * Optional. Engine */ engine?: | "ENGINE_UNSPECIFIED" | "ENGINE_SCANNER" | "V2"; /** * Output only. [Output only] Evaluation ID */ readonly evaluationId?: string; /** * Optional. External data sources */ externalDataSources?: ExternalDataSources[]; /** * Output only. [Output only] Inventory time stamp */ readonly inventoryTime?: Date; /** * Labels as key value pairs */ labels?: { [key: string]: string }; /** * The name of execution resource. The format is * projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution} */ name?: string; /** * Output only. Additional information generated by the execution */ readonly notices?: Notice[]; /** * Output only. [Output only] Result summary for the execution */ readonly resultSummary?: Summary; /** * Output only. execution result summary per rule */ readonly ruleResults?: RuleExecutionResult[]; /** * type represent whether the execution executed directly by user or * scheduled according evaluation.schedule field. */ runType?: | "TYPE_UNSPECIFIED" | "ONE_TIME" | "SCHEDULED"; /** * Output only. [Output only] Start time stamp */ readonly startTime?: Date; /** * Output only. [Output only] State */ readonly state?: | "STATE_UNSPECIFIED" | "RUNNING" | "SUCCEEDED" | "FAILED"; } /** * Message describing the result of an execution */ export interface ExecutionResult { /** * The commands to remediate the violation. */ commands?: Command[]; /** * The URL for the documentation of the rule. */ documentationUrl?: string; /** * The resource that violates the rule. */ resource?: Resource; /** * The rule that is violated in an evaluation. */ rule?: string; /** * The severity of violation. */ severity?: string; /** * Execution result type of the scanned resource */ type?: | "TYPE_UNSPECIFIED" | "TYPE_PASSED" | "TYPE_VIOLATED"; /** * The details of violation in an evaluation result. */ violationDetails?: ViolationDetails; /** * The violation message of an execution. */ violationMessage?: string; } /** * Message for external data sources */ export interface ExternalDataSources { /** * Required. The asset type of the external data source. This can be a * supported Cloud Asset Inventory asset type (see * https://cloud.google.com/asset-inventory/docs/supported-asset-types) to * override the default asset type, or it can be a custom type defined by the * user. */ assetType?: string; /** * Optional. Name of external data source. The name will be used inside the * rego/sql to refer the external data */ name?: string; /** * Required. Type of external data source */ type?: | "TYPE_UNSPECIFIED" | "BIG_QUERY_TABLE"; /** * Required. URI of external data source. example of bq table * {project_ID}.{dataset_ID}.{table_ID} */ uri?: string; } /** * Message describing compute engine instance filter */ export interface GceInstanceFilter { /** * Service account of compute engine */ serviceAccounts?: string[]; } /** * HealthCheck contains the detailed health check of a component based on * asource. */ export interface HealthCheck { /** * Output only. The message of the health check. */ readonly message?: string; /** * Output only. The health check source metric name. */ readonly metric?: string; /** * Output only. The resource the check performs on. */ readonly resource?: CloudResource; /** * Output only. The source of the health check. */ readonly source?: string; /** * Output only. The state of the health check. */ readonly state?: | "STATE_UNSPECIFIED" | "PASSED" | "FAILED" | "DEGRADED" | "SKIPPED" | "UNSUPPORTED"; } /** * The IAM permission status. */ export interface IAMPermission { /** * Output only. Whether the permission is granted. */ readonly granted?: boolean; /** * Output only. The name of the permission. */ readonly name?: string; } /** * A presentation of host resource usage where the workload runs. */ export interface Insight { /** * The insights data for the agent status. */ agentStatus?: AgentStatus; /** * Optional. The instance id where the insight is generated from */ instanceId?: string; /** * The insights data for the OpenShift workload validation. */ openShiftValidation?: OpenShiftValidation; /** * The insights data for SAP system discovery. This is a copy of SAP System * proto and should get updated whenever that one changes. */ sapDiscovery?: SapDiscovery; /** * The insights data for the SAP workload validation. */ sapValidation?: SapValidation; /** * Output only. [Output only] Create time stamp */ readonly sentTime?: Date; /** * The insights data for the sqlserver workload validation. */ sqlserverValidation?: SqlserverValidation; /** * The insights data for workload validation of torso workloads. */ torsoValidation?: TorsoValidation; } function serializeInsight(data: any): Insight { return { ...data, sapDiscovery: data["sapDiscovery"] !== undefined ? serializeSapDiscovery(data["sapDiscovery"]) : undefined, }; } function deserializeInsight(data: any): Insight { return { ...data, sapDiscovery: data["sapDiscovery"] !== undefined ? deserializeSapDiscovery(data["sapDiscovery"]) : undefined, sentTime: data["sentTime"] !== undefined ? new Date(data["sentTime"]) : undefined, }; } /** * Instance Properties. */ export interface InstanceProperties { /** * Optional. Instance number. */ instanceNumber?: string; /** * Optional. Instance machine type. */ machineType?: string; /** * Optional. Instance roles. */ roles?: | "INSTANCE_ROLE_UNSPECIFIED" | "INSTANCE_ROLE_ASCS" | "INSTANCE_ROLE_ERS" | "INSTANCE_ROLE_APP_SERVER" | "INSTANCE_ROLE_HANA_PRIMARY" | "INSTANCE_ROLE_HANA_SECONDARY"[]; /** * Optional. SAP Instance properties. */ sapInstanceProperties?: SapInstanceProperties; /** * Optional. Instance status. */ status?: string; /** * Optional. the next maintenance event on VM */ upcomingMaintenanceEvent?: UpcomingMaintenanceEvent; } function serializeInstanceProperties(data: any): InstanceProperties { return { ...data, upcomingMaintenanceEvent: data["upcomingMaintenanceEvent"] !== undefined ? serializeUpcomingMaintenanceEvent(data["upcomingMaintenanceEvent"]) : undefined, }; } function deserializeInstanceProperties(data: any): InstanceProperties { return { ...data, upcomingMaintenanceEvent: data["upcomingMaintenanceEvent"] !== undefined ? deserializeUpcomingMaintenanceEvent(data["upcomingMaintenanceEvent"]) : undefined, }; } /** * Message represent an rule that failed to be validated. */ export interface InvalidRule { /** * display name of the invalid rule */ displayName?: string; /** * cloud storage destination of the invalid rule */ gcsUri?: string; /** * name of the invalid rule */ name?: string; /** * The error message of valdating rule formats. */ valiadtionError?: string; } /** * Message wrappes a list of invalid rules. */ export interface InvalidRulesWrapper { /** * The invalid rules that failed to be validated. */ invalidRules?: InvalidRule[]; } /** * The response object from `ListActuations`. */ export interface ListActuationsResponse { /** * The list of Actuation */ actuations?: Actuation[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * Unordered list. Locations that could not be reached. */ unreachable?: string[]; } /** * Message for response to listing Deployments */ export interface ListDeploymentsResponse { /** * The list of Deployment */ deployments?: Deployment[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Unordered list. Locations that could not be reached. */ unreachable?: string[]; } /** * List discovered profile Response returns discovered profiles from agents */ export interface ListDiscoveredProfilesResponse { /** * Output only. A token identifying a page of results the server should * return */ readonly nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; /** * Output only. The list of workload profiles */ readonly workloadProfiles?: WorkloadProfile[]; } /** * Message for response to listing Evaluations */ export interface ListEvaluationsResponse { /** * The list of Evaluation */ evaluations?: Evaluation[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * Message for response of list execution results */ export interface ListExecutionResultsResponse { /** * The versions from the specified publisher. */ executionResults?: ExecutionResult[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Message for response to listing Executions */ export interface ListExecutionsResponse { /** * The list of Execution */ executions?: Execution[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response message for Locations.ListLocations. */ export interface ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Location[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; /** * Unordered list. Unreachable resources. Populated when the request sets * `ListOperationsRequest.return_partial_success` and reads across * collections. For example, when attempting to list all resources across all * supported locations. */ unreachable?: string[]; } /** * Mesesage of response of list rules */ export interface ListRulesResponse { /** * A wrapper of the invalid rules that failed to be validated. */ invalidRulesWrapper?: InvalidRulesWrapper; /** * all rules in response */ rules?: Rule[]; } /** * Message for response to list scanned resources */ export interface ListScannedResourcesResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * All scanned resources in response */ scannedResources?: ScannedResource[]; } /** * A resource that represents a Google Cloud location. */ export interface Location { /** * The friendly name for this location, typically a nearby city name. For * example, "Tokyo". */ displayName?: string; /** * Cross-service attributes for the location. For example * {"cloud.googleapis.com/region": "us-east1"} */ labels?: { [key: string]: string }; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string; /** * Service-specific metadata. For example the available capacity at the given * location. */ metadata?: { [key: string]: any }; /** * Resource name for the location, which may vary between implementations. * For example: `"projects/example-project/locations/us-east1"` */ name?: string; } /** * Message for sap instant details */ export interface LocationDetails { /** * Optional. create firewall, if true, create firewall for the deployment. * This field provides an option to not always create firewall for the * deployment. */ createCommsFirewall?: boolean; /** * Optional. network tags */ customTags?: string[]; /** * Optional. when user skip DNS configuration from UI, * deployment_dns_enabled=false otherwise deployment_dns_enabled=true */ deploymentDnsEnabled?: boolean; /** * Optional. dns zone name */ dnsZone?: string; /** * Optional. dns_zone_name_suffix */ dnsZoneNameSuffix?: string; internetAccess?: | "INTERNETACCESS_UNSPECIFIED" | "ALLOW_EXTERNAL_IP" | "CONFIGURE_NAT"; /** * Optional. network project */ networkProject?: string; /** * Required. region_name */ regionName?: string; /** * Required. subnet_name */ subnetName?: string; /** * Required. vpc_name */ vpcName?: string; /** * Required. zone1_name */ zone1Name?: string; /** * Optional. zone2_name */ zone2Name?: string; } /** * Message for additional information generated by the execution */ export interface Notice { /** * Output only. Message of the notice */ readonly message?: string; } /** * A presentation of OpenShift workload insight. The schema of OpenShift * workloads validation related data. */ export interface OpenShiftValidation { /** * Required. The OpenShift cluster ID (e.g. * 8371bb05-7cac-4d38-82c0-0f58c4f6f936). */ clusterId?: string; /** * Required. The validation details of the OpenShift cluster in JSON format. */ validationDetails?: { [key: string]: any }; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Represents the metadata of the long-running operation. */ export interface OperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have been cancelled successfully have * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. */ readonly requestedCancellation?: boolean; /** * Output only. Human-readable status of the operation, if any. */ readonly statusMessage?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * pacemaker configuration */ export interface Pacemaker { /** * Required. bucket location for node certificates */ bucketNameNodeCertificates?: string; /** * Required. pacemaker cluster name */ pacemakerCluster?: string; /** * Required. pacemaker cluster secret name */ pacemakerClusterSecret?: string; /** * Required. pacemaker cluster username */ pacemakerClusterUsername?: string; /** * Required. sql pacemaker secret name */ sqlPacemakerSecret?: string; /** * Required. sql pacemaker username */ sqlPacemakerUsername?: string; } /** * Contains the details of a product. */ export interface Product { /** * Optional. Name of the product. */ name?: string; /** * Optional. Version of the product. */ version?: string; } /** * Additional options for * WorkloadManager#projectsLocationsDeploymentsActuationsCreate. */ export interface ProjectsLocationsDeploymentsActuationsCreateOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * WorkloadManager#projectsLocationsDeploymentsActuationsList. */ export interface ProjectsLocationsDeploymentsActuationsListOptions { /** * Optional. Filtering results */ filter?: string; /** * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for WorkloadManager#projectsLocationsDeploymentsCreate. */ export interface ProjectsLocationsDeploymentsCreateOptions { /** * Required. Id of the deployment */ deploymentId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for WorkloadManager#projectsLocationsDeploymentsDelete. */ export interface ProjectsLocationsDeploymentsDeleteOptions { /** * Optional. If set to true, any actuation will also be deleted. Followed the * best practice from https://aip.dev/135#cascading-delete */ force?: boolean; } /** * Additional options for WorkloadManager#projectsLocationsDeploymentsList. */ export interface ProjectsLocationsDeploymentsListOptions { /** * Optional. Filter resource follow https://google.aip.dev/160 */ filter?: string; /** * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * WorkloadManager#projectsLocationsDiscoveredprofilesList. */ export interface ProjectsLocationsDiscoveredprofilesListOptions { /** * Optional. Filtering results */ filter?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for WorkloadManager#projectsLocationsEvaluationsCreate. */ export interface ProjectsLocationsEvaluationsCreateOptions { /** * Required. Id of the requesting object */ evaluationId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for WorkloadManager#projectsLocationsEvaluationsDelete. */ export interface ProjectsLocationsEvaluationsDeleteOptions { /** * Optional. Followed the best practice from * https://aip.dev/135#cascading-delete */ force?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * WorkloadManager#projectsLocationsEvaluationsExecutionsDelete. */ export interface ProjectsLocationsEvaluationsExecutionsDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * WorkloadManager#projectsLocationsEvaluationsExecutionsList. */ export interface ProjectsLocationsEvaluationsExecutionsListOptions { /** * Filtering results */ filter?: string; /** * Field to sort by. See https://google.aip.dev/132#ordering for more * details. */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * WorkloadManager#projectsLocationsEvaluationsExecutionsResultsList. */ export interface ProjectsLocationsEvaluationsExecutionsResultsListOptions { /** * Filtering results */ filter?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * WorkloadManager#projectsLocationsEvaluationsExecutionsScannedResourcesList. */ export interface ProjectsLocationsEvaluationsExecutionsScannedResourcesListOptions { /** * Filtering results */ filter?: string; /** * Field to sort by. See https://google.aip.dev/132#ordering for more * details. */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; /** * rule name */ rule?: string; } /** * Additional options for WorkloadManager#projectsLocationsEvaluationsList. */ export interface ProjectsLocationsEvaluationsListOptions { /** * Filter to be applied when listing the evaluation results. */ filter?: string; /** * Hint for how to order the results */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for WorkloadManager#projectsLocationsEvaluationsPatch. */ export interface ProjectsLocationsEvaluationsPatchOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. Field mask is used to specify the fields to be overwritten in * the Evaluation resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsEvaluationsPatchOptions(data: any): ProjectsLocationsEvaluationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsEvaluationsPatchOptions(data: any): ProjectsLocationsEvaluationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for WorkloadManager#projectsLocationsInsightsDelete. */ export interface ProjectsLocationsInsightsDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for WorkloadManager#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * Optional. Do not use this field. It is unsupported and is ignored unless * explicitly documented otherwise. This is primarily for internal usage. */ extraLocationTypes?: string; /** * A filter to narrow down results to a preferred subset. The filtering * language accepts strings like `"displayName=tokyo"`, and is documented in * more detail in [AIP-160](https://google.aip.dev/160). */ filter?: string; /** * The maximum number of results to return. If not set, the service selects a * default. */ pageSize?: number; /** * A page token received from the `next_page_token` field in the response. * Send that page token to receive the subsequent page. */ pageToken?: string; } /** * Additional options for WorkloadManager#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * ListOperationsResponse.unreachable field. This can only be `true` when * reading across collections. For example, when `parent` is set to * `"projects/example/locations/-"`. This field is not supported by default * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for WorkloadManager#projectsLocationsRulesList. */ export interface ProjectsLocationsRulesListOptions { /** * The Cloud Storage bucket name for custom rules. */ customRulesBucket?: string; /** * Optional. The evaluation type of the rules will be applied to. The Cloud * Storage bucket name for custom rules. */ evaluationType?: | "EVALUATION_TYPE_UNSPECIFIED" | "SAP" | "SQL_SERVER" | "OTHER" | "SCC_IAC"; /** * Filter based on primary_category, secondary_category */ filter?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Message represent resource in execution result */ export interface Resource { /** * The name of the resource. */ name?: string; /** * The service account associated with the resource. */ serviceAccount?: string; /** * The type of resource. */ type?: string; } /** * Message describing resource filters */ export interface ResourceFilter { /** * Filter compute engine resource */ gceInstanceFilter?: GceInstanceFilter; /** * The label used for filter resource */ inclusionLabels?: { [key: string]: string }; /** * The id pattern for filter resource */ resourceIdPatterns?: string[]; /** * The scopes of evaluation resource */ scopes?: string[]; } /** * Message describing resource status */ export interface ResourceStatus { /** * Historical: Used before 2023-05-22 the new version of rule id if exists */ rulesNewerVersions?: string[]; /** * State of the resource */ state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "DELETING"; } /** * Message represent a rule */ export interface Rule { /** * The CAI asset type of the rule is evaluating, for joined asset types, it * will be the corresponding primary asset types. */ assetType?: string; /** * descrite rule in plain language */ description?: string; /** * the name display in UI */ displayName?: string; /** * the message template for rule */ errorMessage?: string; /** * rule name */ name?: string; /** * the primary category */ primaryCategory?: string; /** * the remediation for the rule */ remediation?: string; /** * Output only. the version of the rule */ readonly revisionId?: string; /** * The type of the rule. */ ruleType?: | "RULE_TYPE_UNSPECIFIED" | "BASELINE" | "CUSTOM"; /** * the secondary category */ secondaryCategory?: string; /** * the severity of the rule */ severity?: string; /** * List of user-defined tags */ tags?: string[]; /** * the docuement url for the rule */ uri?: string; } /** * Message for execution result summary per rule */ export interface RuleExecutionResult { /** * Execution message, if any */ message?: string; /** * Number of violations */ resultCount?: bigint; /** * rule name */ rule?: string; /** * Number of total scanned resources */ scannedResourceCount?: bigint; /** * Output only. The execution status */ readonly state?: | "STATE_UNSPECIFIED" | "STATE_SUCCESS" | "STATE_FAILURE" | "STATE_SKIPPED"; } function serializeRuleExecutionResult(data: any): RuleExecutionResult { return { ...data, resultCount: data["resultCount"] !== undefined ? String(data["resultCount"]) : undefined, scannedResourceCount: data["scannedResourceCount"] !== undefined ? String(data["scannedResourceCount"]) : undefined, }; } function deserializeRuleExecutionResult(data: any): RuleExecutionResult { return { ...data, resultCount: data["resultCount"] !== undefined ? BigInt(data["resultCount"]) : undefined, scannedResourceCount: data["scannedResourceCount"] !== undefined ? BigInt(data["scannedResourceCount"]) : undefined, }; } /** * The rule output of the violation. */ export interface RuleOutput { /** * Output only. Violation details generated by rule. */ readonly details?: { [key: string]: string }; /** * Output only. The message generated by rule. */ readonly message?: string; } /** * Message for creating a Execution */ export interface RunEvaluationRequest { /** * Required. The resource being created */ execution?: Execution; /** * Required. Id of the requesting object If auto-generating Id server-side, * remove this field and execution_id from the method_signature of Create RPC */ executionId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * The component of sap workload */ export interface SapComponent { /** * Output only. All instance properties. */ readonly databaseProperties?: DatabaseProperties; /** * List of host URIs that are part of the HA configuration if present. An * empty list indicates the component is not configured for HA. */ haHosts?: string[]; /** * Output only. resources in the component */ readonly resources?: CloudResource[]; /** * Output only. sid is the sap component identificator */ readonly sid?: string; /** * The detected topology of the component. */ topologyType?: | "TOPOLOGY_TYPE_UNSPECIFIED" | "TOPOLOGY_SCALE_UP" | "TOPOLOGY_SCALE_OUT"; } /** * The schema of SAP system discovery data. */ export interface SapDiscovery { /** * Optional. An SAP system may run without an application layer. */ applicationLayer?: SapDiscoveryComponent; /** * Required. An SAP System must have a database. */ databaseLayer?: SapDiscoveryComponent; /** * Optional. The metadata for SAP system discovery data. */ metadata?: SapDiscoveryMetadata; /** * Optional. The GCP project number that this SapSystem belongs to. */ projectNumber?: string; /** * Output only. A combination of database SID, database instance URI and * tenant DB name to make a unique identifier per-system. */ readonly systemId?: string; /** * Required. Unix timestamp this system has been updated last. */ updateTime?: Date; /** * Optional. Whether to use DR reconciliation or not. */ useDrReconciliation?: boolean; /** * Optional. The properties of the workload. */ workloadProperties?: SapDiscoveryWorkloadProperties; } function serializeSapDiscovery(data: any): SapDiscovery { return { ...data, applicationLayer: data["applicationLayer"] !== undefined ? serializeSapDiscoveryComponent(data["applicationLayer"]) : undefined, databaseLayer: data["databaseLayer"] !== undefined ? serializeSapDiscoveryComponent(data["databaseLayer"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeSapDiscovery(data: any): SapDiscovery { return { ...data, applicationLayer: data["applicationLayer"] !== undefined ? deserializeSapDiscoveryComponent(data["applicationLayer"]) : undefined, databaseLayer: data["databaseLayer"] !== undefined ? deserializeSapDiscoveryComponent(data["databaseLayer"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Message describing the system component. */ export interface SapDiscoveryComponent { /** * Optional. The component is a SAP application. */ applicationProperties?: SapDiscoveryComponentApplicationProperties; /** * Optional. The component is a SAP database. */ databaseProperties?: SapDiscoveryComponentDatabaseProperties; /** * Optional. A list of host URIs that are part of the HA configuration if * present. An empty list indicates the component is not configured for HA. */ haHosts?: string[]; /** * Required. Pantheon Project in which the resources reside. */ hostProject?: string; /** * Optional. The region this component's resources are primarily located in. */ region?: string; /** * Optional. A list of replication sites used in Disaster Recovery (DR) * configurations. */ replicationSites?: SapDiscoveryComponentReplicationSite[]; /** * Optional. The resources in a component. */ resources?: SapDiscoveryResource[]; /** * Optional. The SAP identifier, used by the SAP software and helps * differentiate systems for customers. */ sid?: string; /** * Optional. The detected topology of the component. */ topologyType?: | "TOPOLOGY_TYPE_UNSPECIFIED" | "TOPOLOGY_SCALE_UP" | "TOPOLOGY_SCALE_OUT"; } function serializeSapDiscoveryComponent(data: any): SapDiscoveryComponent { return { ...data, replicationSites: data["replicationSites"] !== undefined ? data["replicationSites"].map((item: any) => (serializeSapDiscoveryComponentReplicationSite(item))) : undefined, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeSapDiscoveryResource(item))) : undefined, }; } function deserializeSapDiscoveryComponent(data: any): SapDiscoveryComponent { return { ...data, replicationSites: data["replicationSites"] !== undefined ? data["replicationSites"].map((item: any) => (deserializeSapDiscoveryComponentReplicationSite(item))) : undefined, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeSapDiscoveryResource(item))) : undefined, }; } /** * A set of properties describing an SAP Application layer. */ export interface SapDiscoveryComponentApplicationProperties { /** * Optional. Deprecated: ApplicationType now tells you whether this is ABAP * or Java. */ abap?: boolean; /** * Optional. Instance number of the SAP application instance. */ appInstanceNumber?: string; /** * Required. Type of the application. Netweaver, etc. */ applicationType?: | "APPLICATION_TYPE_UNSPECIFIED" | "NETWEAVER" | "NETWEAVER_ABAP" | "NETWEAVER_JAVA"; /** * Optional. Instance number of the ASCS instance. */ ascsInstanceNumber?: string; /** * Optional. Resource URI of the recognized ASCS host of the application. */ ascsUri?: string; /** * Optional. Instance number of the ERS instance. */ ersInstanceNumber?: string; /** * Optional. Kernel version for Netweaver running in the system. */ kernelVersion?: string; /** * Optional. Resource URI of the recognized shared NFS of the application. * May be empty if the application server has only a single node. */ nfsUri?: string; } /** * A set of properties describing an SAP Database layer. */ export interface SapDiscoveryComponentDatabaseProperties { /** * Optional. SID of the system database. */ databaseSid?: string; /** * Required. Type of the database. HANA, DB2, etc. */ databaseType?: | "DATABASE_TYPE_UNSPECIFIED" | "HANA" | "MAX_DB" | "DB2" | "ORACLE" | "SQLSERVER" | "ASE"; /** * Optional. The version of the database software running in the system. */ databaseVersion?: string; /** * Optional. Instance number of the SAP instance. */ instanceNumber?: string; /** * Optional. Landscape ID from the HANA nameserver. */ landscapeId?: string; /** * Required. URI of the recognized primary instance of the database. */ primaryInstanceUri?: string; /** * Optional. URI of the recognized shared NFS of the database. May be empty * if the database has only a single node. */ sharedNfsUri?: string; } /** * A replication site used in Disaster Recovery (DR) configurations. */ export interface SapDiscoveryComponentReplicationSite { /** * Optional. The system component for the site. */ component?: SapDiscoveryComponent; /** * Optional. The name of the source site from which this one replicates. */ sourceSite?: string; } function serializeSapDiscoveryComponentReplicationSite(data: any): SapDiscoveryComponentReplicationSite { return { ...data, component: data["component"] !== undefined ? serializeSapDiscoveryComponent(data["component"]) : undefined, }; } function deserializeSapDiscoveryComponentReplicationSite(data: any): SapDiscoveryComponentReplicationSite { return { ...data, component: data["component"] !== undefined ? deserializeSapDiscoveryComponent(data["component"]) : undefined, }; } /** * Message describing SAP discovery system metadata */ export interface SapDiscoveryMetadata { /** * Optional. Customer region string for customer's use. Does not represent * GCP region. */ customerRegion?: string; /** * Optional. Customer defined, something like "E-commerce pre prod" */ definedSystem?: string; /** * Optional. Should be "prod", "QA", "dev", "staging", etc. */ environmentType?: string; /** * Optional. This SAP product name */ sapProduct?: string; } /** * Message describing a resource. */ export interface SapDiscoveryResource { /** * Optional. A set of properties only applying to instance type resources. */ instanceProperties?: SapDiscoveryResourceInstanceProperties; /** * Optional. A list of resource URIs related to this resource. */ relatedResources?: string[]; /** * Required. ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc. */ resourceKind?: | "RESOURCE_KIND_UNSPECIFIED" | "RESOURCE_KIND_INSTANCE" | "RESOURCE_KIND_DISK" | "RESOURCE_KIND_ADDRESS" | "RESOURCE_KIND_FILESTORE" | "RESOURCE_KIND_HEALTH_CHECK" | "RESOURCE_KIND_FORWARDING_RULE" | "RESOURCE_KIND_BACKEND_SERVICE" | "RESOURCE_KIND_SUBNETWORK" | "RESOURCE_KIND_NETWORK" | "RESOURCE_KIND_PUBLIC_ADDRESS" | "RESOURCE_KIND_INSTANCE_GROUP"; /** * Required. The type of this resource. */ resourceType?: | "RESOURCE_TYPE_UNSPECIFIED" | "RESOURCE_TYPE_COMPUTE" | "RESOURCE_TYPE_STORAGE" | "RESOURCE_TYPE_NETWORK"; /** * Required. URI of the resource, includes project, location, and name. */ resourceUri?: string; /** * Required. Unix timestamp of when this resource last had its discovery data * updated. */ updateTime?: Date; } function serializeSapDiscoveryResource(data: any): SapDiscoveryResource { return { ...data, instanceProperties: data["instanceProperties"] !== undefined ? serializeSapDiscoveryResourceInstanceProperties(data["instanceProperties"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeSapDiscoveryResource(data: any): SapDiscoveryResource { return { ...data, instanceProperties: data["instanceProperties"] !== undefined ? deserializeSapDiscoveryResourceInstanceProperties(data["instanceProperties"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * A set of properties only present for an instance type resource */ export interface SapDiscoveryResourceInstanceProperties { /** * Optional. App server instances on the host */ appInstances?: SapDiscoveryResourceInstancePropertiesAppInstance[]; /** * Optional. A list of instance URIs that are part of a cluster with this * one. */ clusterInstances?: string[]; /** * Optional. Disk mounts on the instance. */ diskMounts?: SapDiscoveryResourceInstancePropertiesDiskMount[]; /** * Optional. The VM's instance number. */ instanceNumber?: bigint; /** * Optional. Bitmask of instance role, a resource may have multiple roles at * once. */ instanceRole?: | "INSTANCE_ROLE_UNSPECIFIED" | "INSTANCE_ROLE_ASCS" | "INSTANCE_ROLE_ERS" | "INSTANCE_ROLE_APP_SERVER" | "INSTANCE_ROLE_DATABASE" | "INSTANCE_ROLE_ASCS_ERS" | "INSTANCE_ROLE_ASCS_APP_SERVER" | "INSTANCE_ROLE_ASCS_DATABASE" | "INSTANCE_ROLE_ERS_APP_SERVER" | "INSTANCE_ROLE_ERS_DATABASE" | "INSTANCE_ROLE_APP_SERVER_DATABASE" | "INSTANCE_ROLE_ASCS_ERS_APP_SERVER" | "INSTANCE_ROLE_ASCS_ERS_DATABASE" | "INSTANCE_ROLE_ASCS_APP_SERVER_DATABASE" | "INSTANCE_ROLE_ERS_APP_SERVER_DATABASE" | "INSTANCE_ROLE_ASCS_ERS_APP_SERVER_DATABASE"; /** * Optional. Instance is part of a DR site. */ isDrSite?: boolean; /** * Optional. The kernel version of the instance. */ osKernelVersion?: SapDiscoveryResourceInstancePropertiesKernelVersion; /** * Optional. A virtual hostname of the instance if it has one. */ virtualHostname?: string; } function serializeSapDiscoveryResourceInstanceProperties(data: any): SapDiscoveryResourceInstanceProperties { return { ...data, instanceNumber: data["instanceNumber"] !== undefined ? String(data["instanceNumber"]) : undefined, }; } function deserializeSapDiscoveryResourceInstanceProperties(data: any): SapDiscoveryResourceInstanceProperties { return { ...data, instanceNumber: data["instanceNumber"] !== undefined ? BigInt(data["instanceNumber"]) : undefined, }; } /** * Fields to describe an SAP application server instance. */ export interface SapDiscoveryResourceInstancePropertiesAppInstance { /** * Optional. Instance name of the SAP application instance. */ name?: string; /** * Optional. Instance number of the SAP application instance. */ number?: string; } /** * Disk mount on the instance. */ export interface SapDiscoveryResourceInstancePropertiesDiskMount { /** * Optional. Names of the disks providing this mount point. */ diskNames?: string[]; /** * Optional. Filesystem mount point. */ mountPoint?: string; /** * Optional. Name of the disk. */ name?: string; } /** * KernelVersion encapsulates the kernel version data for the system. */ export interface SapDiscoveryResourceInstancePropertiesKernelVersion { /** * Optional. Captures the distro-specific kernel version, the portion of the * string following the first dash. */ distroKernel?: SapDiscoveryResourceInstancePropertiesKernelVersionVersion; /** * Optional. Captures the OS-specific kernel version, the portion of the * string up to the first dash. */ osKernel?: SapDiscoveryResourceInstancePropertiesKernelVersionVersion; /** * Optional. Raw string of the kernel version. */ rawString?: string; } /** * Version is reported as Major.Minor.Build.Patch. */ export interface SapDiscoveryResourceInstancePropertiesKernelVersionVersion { /** * Optional. The build version number. */ build?: number; /** * Optional. The major version number. */ major?: number; /** * Optional. The minor version number. */ minor?: number; /** * Optional. The patch version number. */ patch?: number; /** * Optional. A catch-all for any unparsed version components. This is in case * the number of points in the version string exceeds the expected count of 4. */ remainder?: string; } /** * A set of properties describing an SAP workload. */ export interface SapDiscoveryWorkloadProperties { /** * Optional. List of SAP Products and their versions running on the system. */ productVersions?: SapDiscoveryWorkloadPropertiesProductVersion[]; /** * Optional. A list of SAP software components and their versions running on * the system. */ softwareComponentVersions?: SapDiscoveryWorkloadPropertiesSoftwareComponentProperties[]; } /** * A product name and version. */ export interface SapDiscoveryWorkloadPropertiesProductVersion { /** * Optional. Name of the product. */ name?: string; /** * Optional. Version of the product. */ version?: string; } /** * A SAP software component name, version, and type. */ export interface SapDiscoveryWorkloadPropertiesSoftwareComponentProperties { /** * Optional. The component's minor version. */ extVersion?: string; /** * Optional. Name of the component. */ name?: string; /** * Optional. The component's type. */ type?: string; /** * Optional. The component's major version. */ version?: string; } /** * SAP instance properties. */ export interface SapInstanceProperties { /** * Optional. Sap Instance Agent status. */ agentStates?: AgentStates; /** * Optional. SAP Instance numbers. They are from '00' to '99'. */ numbers?: string[]; } /** * Message for sap system workload */ export interface SapSystemS4Config { allowStoppingForUpdate?: boolean; /** * Ansible runner service account - let custoemrs bring their own SA for * Ansible runner */ ansibleRunnerServiceAccount?: string; /** * instance details */ app?: AppDetails; /** * database details */ database?: DatabaseDetails; /** * Required. two model non-HA and HA supported */ deploymentModel?: | "DEPLOYMENT_MODEL_UNSPECIFIED" | "DISTRIBUTED" | "DISTRIBUTED_HA"; /** * Required. deployment environment */ environmentType?: | "ENVIRONMENT_TYPE_UNSPECIFIED" | "NON_PRODUCTION" | "PRODUCTION"; /** * the project that infrastructure deployed, current only support the same * project where the deployment resource exist. */ gcpProjectId?: string; /** * database details */ location?: LocationDetails; /** * Required. media_bucket_name */ mediaBucketName?: string; /** * Optional. sap_boot_disk_image */ sapBootDiskImage?: string; /** * Required. support scale up and scale out */ scalingMethod?: | "SCALE_METHOD_UNSPECIFIED" | "SCALE_UP" | "SCALE_OUT"; /** * Required. sap hana version */ version?: | "VERSION_UNSPECIFIED" | "S4_HANA_2021" | "S4_HANA_2022" | "S4_HANA_2023"; /** * vm_prefix */ vmPrefix?: string; } /** * A presentation of SAP workload insight. The schema of SAP workloads * validation related data. */ export interface SapValidation { /** * Required. The project_id of the cloud project that the Insight data comes * from. */ projectId?: string; /** * Optional. A list of SAP validation metrics data. */ validationDetails?: SapValidationValidationDetail[]; /** * Optional. The zone of the instance that the Insight data comes from. */ zone?: string; } /** * Message describing the SAP validation metrics. */ export interface SapValidationValidationDetail { /** * Optional. The pairs of metrics data: field name & field value. */ details?: { [key: string]: string }; /** * Optional. Was there a SAP system detected for this validation type. */ isPresent?: boolean; /** * Optional. The SAP system that the validation data is from. */ sapValidationType?: | "SAP_VALIDATION_TYPE_UNSPECIFIED" | "SYSTEM" | "COROSYNC" | "PACEMAKER" | "HANA" | "NETWEAVER" | "HANA_SECURITY" | "CUSTOM"; } /** * The body of sap workload */ export interface SapWorkload { /** * Output only. application component */ readonly application?: SapComponent; /** * Output only. The architecture. */ readonly architecture?: | "ARCHITECTURE_UNSPECIFIED" | "INVALID" | "CENTRALIZED" | "DISTRIBUTED" | "DISTRIBUTED_HA" | "STANDALONE_DATABASE" | "STANDALONE_DATABASE_HA"; /** * Output only. database component */ readonly database?: SapComponent; /** * Output only. The metadata for SAP workload. */ readonly metadata?: { [key: string]: string }; /** * Output only. The products on this workload. */ readonly products?: Product[]; } /** * Message of scanned resource */ export interface ScannedResource { /** * resource name */ resource?: string; /** * resource type */ type?: string; } /** * The state of the service. */ export interface ServiceStates { /** * Optional. Output only. The IAM permissions for the service. */ readonly iamPermissions?: IAMPermission[]; /** * Output only. The overall state of the service. */ readonly state?: | "STATE_UNSPECIFIED" | "CONFIG_FAILURE" | "IAM_FAILURE" | "FUNCTIONALITY_FAILURE" | "ENABLED" | "DISABLED"; } /** * * A ShellCommand is invoked via the agent's command line executor */ export interface ShellCommand { /** * args is a string of arguments to be passed to the command. */ args?: string; /** * command is the name of the command to be executed. */ command?: string; /** * Optional. If not specified, the default timeout is 60 seconds. */ timeoutSeconds?: number; } /** * Location and networking details for configuring SQL server workload */ export interface SqlLocationDetails { /** * Optional. create a new DNS Zone when the field is empty, Only show for * `Using an existing DNS` List of existing DNS Zones tf variable name: * existing_dns_zone_name */ dnsZone?: string; /** * Required. the project that infrastructure deployed, currently only * supports the same project where the deployment resource exists. */ gcpProjectId?: string; /** * Required. Internet Access */ internetAccess?: | "INTERNET_ACCESS_UNSPECIFIED" | "ALLOW_EXTERNAL_IP" | "CONFIGURE_NAT"; /** * Required. network name */ network?: string; /** * Required. primary zone */ primaryZone?: string; /** * Required. region name */ region?: string; /** * Optional. secondary zone can't be same as primary_zone and is only for * High Availability deployment mode */ secondaryZone?: string; /** * Required. subnetwork name */ subnetwork?: string; /** * Optional. teriary zone can't be same as primary_zone and secondary zone, * and it is only for High Availability deployment mode */ tertiaryZone?: string; } /** * A presentation of SQLServer workload insight. The schema of SqlServer * workloads validation related data. */ export interface SqlserverValidation { /** * Optional. The agent version collected this data point */ agentVersion?: string; /** * Required. The instance_name of the instance that the Insight data comes * from. According to https://linter.aip.dev/122/name-suffix: field names * should not use the _name suffix unless the field would be ambiguous without * it. */ instance?: string; /** * Required. The project_id of the cloud project that the Insight data comes * from. */ projectId?: string; /** * Optional. A list of SqlServer validation metrics data. */ validationDetails?: SqlserverValidationValidationDetail[]; } /** * Message containing collected data names and values. */ export interface SqlserverValidationDetails { /** * Required. Collected data is in format. */ fields?: { [key: string]: string }; } /** * Message describing the Sqlserver validation metrics. */ export interface SqlserverValidationValidationDetail { /** * Required. Details wraps map that represents collected data names and * values. */ details?: SqlserverValidationDetails[]; /** * Optional. The Sqlserver system that the validation data is from. */ type?: | "SQLSERVER_VALIDATION_TYPE_UNSPECIFIED" | "OS" | "DB_LOG_DISK_SEPARATION" | "DB_MAX_PARALLELISM" | "DB_CXPACKET_WAITS" | "DB_TRANSACTION_LOG_HANDLING" | "DB_VIRTUAL_LOG_FILE_COUNT" | "DB_BUFFER_POOL_EXTENSION" | "DB_MAX_SERVER_MEMORY" | "INSTANCE_METRICS" | "DB_INDEX_FRAGMENTATION" | "DB_TABLE_INDEX_COMPRESSION" | "DB_BACKUP_POLICY"; } /** * Message for MS SQL workload */ export interface SqlServerWorkload { /** * Required. active directory details */ activeDirectory?: ActiveDirectory; /** * Compute engine service account - let customers bring their own SA for * Compute engine */ computeEngineServiceAccount?: string; /** * Required. database details */ database?: Database; /** * Required. HIGH_AVAILABILITY or SINGLE_INSTANCE */ deploymentModel?: | "DEPLOYMENT_MODEL_UNSPECIFIED" | "HIGH_AVAILABILITY" | "SINGLE_INSTANCE"; /** * Required. deployment environment */ environmentType?: | "ENVIRONMENT_TYPE_UNSPECIFIED" | "NON_PRODUCTION" | "PRODUCTION"; /** * Optional. SHARED_DISK or S2D */ fciType?: | "FCI_TYPE_UNSPECIFIED" | "SHARED_DISK" | "S2D"; /** * Optional. AOAG or FCI, it is only needed for High Availability deployment * mode */ haType?: | "HA_TYPE_UNSPECIFIED" | "AOAG" | "FCI"; /** * Required. SQL licensing type */ isSqlPayg?: boolean; /** * Required. location details */ location?: SqlLocationDetails; /** * Required. name of the media storing SQL server installation files */ mediaBucket?: string; /** * Required. type of the operating system the SQL server is going to run on * top of */ operatingSystemType?: | "OPERATING_SYSTEM_TYPE_UNSPECIFIED" | "WINDOWS" | "UBUNTU" | "RED_HAT_ENTERPRISE_LINUX" | "SUSE"; /** * Required. the image of the operating system */ osImage?: string; /** * Optional. OS image type, it's used to create boot disks for VM instances * When either Windows licensing type or SQL licensing type is BYOL, this * option is disabled and default to custom image */ osImageType?: | "OS_IMAGE_TYPE_UNSPECIFIED" | "PUBLIC_IMAGE" | "CUSTOM_IMAGE"; /** * Optional. pacemaker configuration, only applicable for Linux HA * deployments */ pacemaker?: Pacemaker; /** * Optional. SQL Server Edition type, only applicable when Operating System * is Linux */ sqlServerEdition?: | "SQL_SERVER_EDITION_TYPE_UNSPECIFIED" | "SQL_SERVER_EDITION_TYPE_DEVELOPER" | "SQL_SERVER_EDITION_TYPE_ENTERPRISE" | "SQL_SERVER_EDITION_TYPE_STANDARD" | "SQL_SERVER_EDITION_TYPE_WEB"; /** * Optional. 2017 or 2019 or 2022 */ sqlServerVersion?: | "SQL_SERVER_VERSION_TYPE_UNSPECIFIED" | "SQL_SERVER_VERSION_TYPE_2017" | "SQL_SERVER_VERSION_TYPE_2019" | "SQL_SERVER_VERSION_TYPE_2022"; /** * Required. should be unique in the project */ vmPrefix?: string; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * Message for execution summary */ export interface Summary { /** * Output only. Number of failures */ readonly failures?: bigint; /** * Output only. Number of new failures compared to the previous execution */ readonly newFailures?: bigint; /** * Output only. Number of new fixes compared to the previous execution */ readonly newFixes?: bigint; } /** * In order to align with Infra Manager dependency, we create the same * TerraformVariable message to represent a Terraform input variable, by * following Infra Manager's API documentation: * https://cloud.google.com/infrastructure-manager/docs/reference/rest A * Terraform input variable. */ export interface TerraformVariable { /** * Optional. Input variable value. */ inputValue?: any; } /** * The schema of torso workload validation data. */ export interface TorsoValidation { /** * Required. agent_version lists the version of the agent that collected this * data. */ agentVersion?: string; /** * Optional. instance_name lists the human readable name of the instance that * the data comes from. */ instanceName?: string; /** * Required. project_id lists the human readable cloud project that the data * comes from. */ projectId?: string; /** * Required. validation_details contains the pairs of validation data: field * name & field value. */ validationDetails?: { [key: string]: string }; /** * Required. workload_type specifies the type of torso workload. */ workloadType?: | "WORKLOAD_TYPE_UNSPECIFIED" | "MYSQL" | "ORACLE" | "REDIS"; } /** * Maintenance Event */ export interface UpcomingMaintenanceEvent { /** * Optional. End time */ endTime?: Date; /** * Optional. Maintenance status */ maintenanceStatus?: string; /** * Optional. Instance maintenance behavior. Could be `MIGRATE` or * `TERMINATE`. */ onHostMaintenance?: string; /** * Optional. Start time */ startTime?: Date; /** * Optional. Type */ type?: string; } function serializeUpcomingMaintenanceEvent(data: any): UpcomingMaintenanceEvent { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeUpcomingMaintenanceEvent(data: any): UpcomingMaintenanceEvent { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Message describing the violation in an evaluation result. */ export interface ViolationDetails { /** * The name of the asset. */ asset?: string; /** * Details of the violation. */ observed?: { [key: string]: string }; /** * Output only. The rule output of the violation. */ readonly ruleOutput?: RuleOutput[]; /** * The service account associated with the resource. */ serviceAccount?: string; } /** * Workload resource. */ export interface WorkloadProfile { /** * Optional. such as name, description, version. More example can be found in * deployment */ labels?: { [key: string]: string }; /** * Identifier. name of resource names have the form * 'projects/{project_id}/locations/{location}/workloadProfiles/{workload_id}' */ name?: string; /** * Required. time when the workload data was refreshed */ refreshedTime?: Date; /** * The sap workload content */ sapWorkload?: SapWorkload; /** * Required. The type of the workload */ workloadType?: | "WORKLOAD_TYPE_UNSPECIFIED" | "S4_HANA"; } function serializeWorkloadProfile(data: any): WorkloadProfile { return { ...data, refreshedTime: data["refreshedTime"] !== undefined ? data["refreshedTime"].toISOString() : undefined, }; } function deserializeWorkloadProfile(data: any): WorkloadProfile { return { ...data, refreshedTime: data["refreshedTime"] !== undefined ? new Date(data["refreshedTime"]) : undefined, }; } /** * WorkloadProfileHealth contains the detailed health check of workload. */ export interface WorkloadProfileHealth { /** * The time when the health check was performed. */ checkTime?: Date; /** * The detailed condition reports of each component. */ componentsHealth?: ComponentHealth[]; /** * Output only. The health state of the workload. */ readonly state?: | "HEALTH_STATE_UNSPECIFIED" | "HEALTHY" | "UNHEALTHY" | "CRITICAL" | "UNSUPPORTED"; } function serializeWorkloadProfileHealth(data: any): WorkloadProfileHealth { return { ...data, checkTime: data["checkTime"] !== undefined ? data["checkTime"].toISOString() : undefined, }; } function deserializeWorkloadProfileHealth(data: any): WorkloadProfileHealth { return { ...data, checkTime: data["checkTime"] !== undefined ? new Date(data["checkTime"]) : undefined, }; } /** * Request for sending the data insights. */ export interface WriteInsightRequest { /** * Optional. The agent version collected this data point. */ agentVersion?: string; /** * Required. The metrics data details. */ insight?: Insight; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } function serializeWriteInsightRequest(data: any): WriteInsightRequest { return { ...data, insight: data["insight"] !== undefined ? serializeInsight(data["insight"]) : undefined, }; } function deserializeWriteInsightRequest(data: any): WriteInsightRequest { return { ...data, insight: data["insight"] !== undefined ? deserializeInsight(data["insight"]) : undefined, }; } /** * The response for write insights request. */ export interface WriteInsightResponse { }