-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PiperOrigin-RevId: 618313694
- Loading branch information
Googler
committed
Mar 22, 2024
1 parent
6ce3dc5
commit 0d68a7f
Showing
2 changed files
with
66 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,40 +4,60 @@ package preflight_validations; | |
|
||
option java_multiple_files = true; | ||
|
||
// Describes the details of a validation item. | ||
message ValidationItem { | ||
// Required. Metadata of the validation item. | ||
oneof metadata { // Using 'oneof' for specialized metadata | ||
// Metadata for Google Cloud Service Account. | ||
GoogleCloudServiceAccountMetadata sa_metadata = 2; | ||
// Metadata for Google Cloud Project Quota. | ||
GoogleCloudProjectQuotaMetadata quota_metadata = 3; | ||
// Metadata for Google Cloud Api Enablement. | ||
GoogleCloudApiEnablementMetadata api_metadata = 4; | ||
} | ||
// Describes the details of validation items. | ||
message ValidationItems { | ||
// Validation for Google Cloud Service Account. | ||
repeated GoogleCloudServiceAccountValidation sa_validations = 1; | ||
// Validation for Google Cloud Project Quota. | ||
repeated GoogleCloudProjectQuotaValidation quota_validations = 2; | ||
// Validation for Google Cloud Api Enablement. | ||
repeated GoogleCloudApiEnablementValidation api_validations = 3; | ||
} | ||
|
||
// Describes the metadata of validation type of GOOGLE_CLOUD_PROJECT_QUOTA. | ||
message GoogleCloudProjectQuotaMetadata { | ||
// Required. Service name of the quota. Example: "compute.googleapis.com" | ||
string service_name = 1; | ||
// Required. The map of quota metrics name to its recommended value. | ||
// Example: {"CPUs": 440} | ||
map<string, int64> metrics_recommendations = 2; | ||
// Describes the details for Google Cloud Project Quota Validation. | ||
message GoogleCloudProjectQuotaValidation { | ||
// Required. Metric name of the quota. Example: "compute.googleapis.com/cpus" | ||
string metric_name = 1; | ||
// Required. Value of the quota demand. Example: 2 or 3.5 | ||
// We will validate if the demand is under the limit or not. | ||
oneof value { | ||
// A signed 64-bit integer value. | ||
int64 int64_value = 2; | ||
// A double precision floating point value. | ||
double double_value = 3; | ||
} | ||
} | ||
|
||
// Describes the metadata of | ||
// GOOGLE_CLOUD_SERVICE_ACCOUNT_PERMISSION. | ||
message GoogleCloudServiceAccountMetadata { | ||
// Required. Principal name of the service account. | ||
string principal_name = 1; | ||
// Required. Permissions that the service account should have. | ||
// Describes the details for Google Cloud Service Account Validation. | ||
message GoogleCloudServiceAccountValidation { | ||
// Required. Default principal email of the service account used for | ||
// validation. Example: | ||
// "{{$.pipeline_google_cloud_project_id}}[email protected]" | ||
// Use placeholder to specify the dynamic value like project id. | ||
string default_principal_email = 1; | ||
|
||
// Optional. If specified, the principal email will be overridden based on the | ||
// placeholder. Currently support two placeholders: 1. | ||
// "{{$.pipeline_google_cloud_service_account}}"(actual value is from | ||
// PipelineJob.service_account 2. | ||
// "{{$.parameter.service_account}}"(actual value is from the input parameter | ||
// of the component/pipeline). If the value doesn't exist or is empty, | ||
// overriding won't happen. | ||
string override_placeholder = 2; | ||
|
||
// Optional. Permission required to have for the service account. | ||
// Pipeline service will check if provided SA has these permissions. | ||
// Example: "aiplatform.metadataStores.get" | ||
repeated string permissions = 2; | ||
repeated string permissions = 3; | ||
|
||
// Optional. Roles need to be granted for the service account. | ||
// The role names will occur in preflight validations' error message | ||
// as an action item for users. | ||
repeated string role_names = 4; | ||
} | ||
|
||
// Describes the metadata of validation type of GOOGLE_CLOUD_API_ENABLEMENT. | ||
message GoogleCloudApiEnablementMetadata { | ||
// Describes the details of Google Cloud Api Enablement Validation. | ||
message GoogleCloudApiEnablementValidation { | ||
// Required. Service names of Google Cloud Api. | ||
repeated string service_names = 1; | ||
} |
49 changes: 19 additions & 30 deletions
49
components/google-cloud/google_cloud_pipeline_components/proto/preflight_validations_pb2.py
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.