@@ -4,40 +4,60 @@ package preflight_validations;
44
55option java_multiple_files = true ;
66
7- // Describes the details of a validation item.
8- message ValidationItem {
9- // Required. Metadata of the validation item.
10- oneof metadata { // Using 'oneof' for specialized metadata
11- // Metadata for Google Cloud Service Account.
12- GoogleCloudServiceAccountMetadata sa_metadata = 2 ;
13- // Metadata for Google Cloud Project Quota.
14- GoogleCloudProjectQuotaMetadata quota_metadata = 3 ;
15- // Metadata for Google Cloud Api Enablement.
16- GoogleCloudApiEnablementMetadata api_metadata = 4 ;
17- }
7+ // Describes the details of validation items.
8+ message ValidationItems {
9+ // Validation for Google Cloud Service Account.
10+ repeated GoogleCloudServiceAccountValidation sa_validations = 1 ;
11+ // Validation for Google Cloud Project Quota.
12+ repeated GoogleCloudProjectQuotaValidation quota_validations = 2 ;
13+ // Validation for Google Cloud Api Enablement.
14+ repeated GoogleCloudApiEnablementValidation api_validations = 3 ;
1815}
1916
20- // Describes the metadata of validation type of GOOGLE_CLOUD_PROJECT_QUOTA.
21- message GoogleCloudProjectQuotaMetadata {
22- // Required. Service name of the quota. Example: "compute.googleapis.com"
23- string service_name = 1 ;
24- // Required. The map of quota metrics name to its recommended value.
25- // Example: {"CPUs": 440}
26- map <string , int64 > metrics_recommendations = 2 ;
17+ // Describes the details for Google Cloud Project Quota Validation.
18+ message GoogleCloudProjectQuotaValidation {
19+ // Required. Metric name of the quota. Example: "compute.googleapis.com/cpus"
20+ string metric_name = 1 ;
21+ // Required. Value of the quota demand. Example: 2 or 3.5
22+ // We will validate if the demand is under the limit or not.
23+ oneof value {
24+ // A signed 64-bit integer value.
25+ int64 int64_value = 2 ;
26+ // A double precision floating point value.
27+ double double_value = 3 ;
28+ }
2729}
2830
29- // Describes the metadata of
30- // GOOGLE_CLOUD_SERVICE_ACCOUNT_PERMISSION.
31- message GoogleCloudServiceAccountMetadata {
32- // Required. Principal name of the service account.
33- string principal_name = 1 ;
34- // Required. Permissions that the service account should have.
31+ // Describes the details for Google Cloud Service Account Validation.
32+ message GoogleCloudServiceAccountValidation {
33+ // Required. Default principal email of the service account used for
34+ // validation. Example:
35+ // "{{$.pipeline_google_cloud_project_id}}-compute@developer.gserviceaccount.com"
36+ // Use placeholder to specify the dynamic value like project id.
37+ string default_principal_email = 1 ;
38+
39+ // Optional. If specified, the principal email will be overridden based on the
40+ // placeholder. Currently support two placeholders: 1.
41+ // "{{$.pipeline_google_cloud_service_account}}"(actual value is from
42+ // PipelineJob.service_account 2.
43+ // "{{$.parameter.service_account}}"(actual value is from the input parameter
44+ // of the component/pipeline). If the value doesn't exist or is empty,
45+ // overriding won't happen.
46+ string override_placeholder = 2 ;
47+
48+ // Optional. Permission required to have for the service account.
49+ // Pipeline service will check if provided SA has these permissions.
3550 // Example: "aiplatform.metadataStores.get"
36- repeated string permissions = 2 ;
51+ repeated string permissions = 3 ;
52+
53+ // Optional. Roles need to be granted for the service account.
54+ // The role names will occur in preflight validations' error message
55+ // as an action item for users.
56+ repeated string role_names = 4 ;
3757}
3858
39- // Describes the metadata of validation type of GOOGLE_CLOUD_API_ENABLEMENT .
40- message GoogleCloudApiEnablementMetadata {
59+ // Describes the details of Google Cloud Api Enablement Validation .
60+ message GoogleCloudApiEnablementValidation {
4161 // Required. Service names of Google Cloud Api.
4262 repeated string service_names = 1 ;
4363}
0 commit comments