Standardize label validation in JSON schemas to conform with GCP platform limits (#4021)
Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
@@ -11,7 +11,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^[a-z][a-z0-9_-]{0,62}$": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_-]{0,63}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metadata_template": {
|
||||
"type": "string"
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
- **description**: *string*
|
||||
- **display_name**: *string*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: false*
|
||||
- **`^[a-z][a-z0-9_-]{0,62}$`**: *string*
|
||||
<br>*pattern: ^[a-z0-9_-]{0,63}$*
|
||||
- **metadata_template**: *string*
|
||||
- **iam**: *reference([iam](#refs-iam))*
|
||||
- **iam_bindings**: *reference([iam_bindings](#refs-iam_bindings))*
|
||||
|
||||
@@ -19,8 +19,12 @@
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"description": "User-defined labels.",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^[a-z][a-z0-9_-]{0,62}$": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_-]{0,63}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ip_cidr_range": {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
- **name**: *string*
|
||||
- **description**: *string*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: string*
|
||||
<br>*additional properties: false*
|
||||
- **`^[a-z][a-z0-9_-]{0,62}$`**: *string*
|
||||
<br>*pattern: ^[a-z0-9_-]{0,63}$*
|
||||
- **ip_cidr_range**: *string*
|
||||
- ⁺**usage**: *string*
|
||||
<br>*enum: ['FOR_VPC', 'EXTERNAL_TO_VPC', 'FOR_MIGRATION']*
|
||||
|
||||
@@ -11,7 +11,14 @@
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^[a-z][a-z0-9_-]{0,62}$": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_-]{0,63}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metadata_template": {
|
||||
"type": "string"
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
- **description**: *string*
|
||||
- **display_name**: *string*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: false*
|
||||
- **`^[a-z][a-z0-9_-]{0,62}$`**: *string*
|
||||
<br>*pattern: ^[a-z0-9_-]{0,63}$*
|
||||
- **metadata_template**: *string*
|
||||
- **iam**: *reference([iam](#refs-iam))*
|
||||
- **iam_bindings**: *reference([iam_bindings](#refs-iam_bindings))*
|
||||
|
||||
@@ -540,6 +540,16 @@
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^[a-z][a-z0-9_-]{0,62}$": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_-]{0,63}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bucket": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@@ -563,10 +573,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
"$ref": "#/$defs/labels"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
@@ -1011,10 +1018,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
"$ref": "#/$defs/labels"
|
||||
},
|
||||
"partner": {
|
||||
"type": "string",
|
||||
|
||||
@@ -172,6 +172,10 @@
|
||||
|
||||
## Definitions
|
||||
|
||||
- **labels**<a name="refs-labels"></a>: *object*
|
||||
<br>*additional properties: false*
|
||||
- **`^[a-z][a-z0-9_-]{0,62}$`**: *string*
|
||||
<br>*pattern: ^[a-z0-9_-]{0,63}$*
|
||||
- **bucket**<a name="refs-bucket"></a>: *object*
|
||||
<br>*additional properties: false*
|
||||
- **name**: *string*
|
||||
@@ -180,8 +184,7 @@
|
||||
- **iam_bindings**: *reference([iam_bindings](#refs-iam_bindings))*
|
||||
- **iam_bindings_additive**: *reference([iam_bindings_additive](#refs-iam_bindings_additive))*
|
||||
- **force_destroy**: *boolean*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: string*
|
||||
- **labels**: *reference([labels](#refs-labels))*
|
||||
- **location**: *string*
|
||||
- **managed_folders**: *object*
|
||||
<br>*additional properties: false*
|
||||
@@ -309,8 +312,7 @@
|
||||
- ⁺**location**: *string*
|
||||
- ⁺**organization**: *string*
|
||||
- **enable_sovereign_controls**: *boolean*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: string*
|
||||
- **labels**: *reference([labels](#refs-labels))*
|
||||
- **partner**: *string*
|
||||
<br>*enum: ['LOCAL_CONTROLS_BY_S3NS', 'PARTNER_UNSPECIFIED', 'SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM', 'SOVEREIGN_CONTROLS_BY_CNTXT', 'SOVEREIGN_CONTROLS_BY_PSN', 'SOVEREIGN_CONTROLS_BY_SIA_MINSAIT', 'SOVEREIGN_CONTROLS_BY_T_SYSTEMS']*
|
||||
- **partner_permissions**: *object*
|
||||
|
||||
@@ -546,7 +546,7 @@
|
||||
}
|
||||
},
|
||||
"labels": {
|
||||
"type": "object"
|
||||
"$ref": "#/$defs/labels"
|
||||
},
|
||||
"pam_entitlements": {
|
||||
"$ref": "#/$defs/pam_entitlements"
|
||||
@@ -586,7 +586,7 @@
|
||||
}
|
||||
},
|
||||
"labels": {
|
||||
"type": "object"
|
||||
"$ref": "#/$defs/labels"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
@@ -1191,6 +1191,16 @@
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^[a-z][a-z0-9_-]{0,62}$": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_-]{0,63}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bucket": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@@ -1221,10 +1231,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
"$ref": "#/$defs/labels"
|
||||
},
|
||||
"lifecycle_rules": {
|
||||
"type": "object",
|
||||
@@ -1805,10 +1812,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
"$ref": "#/$defs/labels"
|
||||
},
|
||||
"message_retention_duration": {
|
||||
"type": "string"
|
||||
@@ -1871,10 +1875,7 @@
|
||||
"$ref": "#/$defs/iam_bindings_additive"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
"$ref": "#/$defs/labels"
|
||||
},
|
||||
"message_retention_duration": {
|
||||
"type": "string"
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
- ⁺**algorithm**: *string*
|
||||
- **protection_level**: *string*
|
||||
<br>*default: SOFTWARE*, *enum: ['SOFTWARE', 'HSM', 'EXTERNAL', 'EXTERNAL_VPC']*
|
||||
- **labels**: *object*
|
||||
- **labels**: *reference([labels](#refs-labels))*
|
||||
- **pam_entitlements**: *reference([pam_entitlements](#refs-pam_entitlements))*
|
||||
- **log_buckets**: *object*
|
||||
<br>*additional properties: false*
|
||||
@@ -181,7 +181,7 @@
|
||||
- **enabled**: *boolean*
|
||||
- **excluded_networks**: *array*
|
||||
- items: *string*
|
||||
- **labels**: *object*
|
||||
- **labels**: *reference([labels](#refs-labels))*
|
||||
- **location**: *string*
|
||||
- **name**: *string*
|
||||
- **threat_detector_provider**: *string*
|
||||
@@ -327,6 +327,10 @@
|
||||
|
||||
## Definitions
|
||||
|
||||
- **labels**<a name="refs-labels"></a>: *object*
|
||||
<br>*additional properties: false*
|
||||
- **`^[a-z][a-z0-9_-]{0,62}$`**: *string*
|
||||
<br>*pattern: ^[a-z0-9_-]{0,63}$*
|
||||
- **bucket**<a name="refs-bucket"></a>: *object*
|
||||
<br>*additional properties: false*
|
||||
- **name**: *string*
|
||||
@@ -337,8 +341,7 @@
|
||||
- **iam_bindings**: *reference([iam_bindings](#refs-iam_bindings))*
|
||||
- **iam_bindings_additive**: *reference([iam_bindings_additive](#refs-iam_bindings_additive))*
|
||||
- **force_destroy**: *boolean*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: string*
|
||||
- **labels**: *reference([labels](#refs-labels))*
|
||||
- **lifecycle_rules**: *object*
|
||||
<br>*additional properties: false*
|
||||
- **`^[a-zA-Z0-9_-]+$`**: *object*
|
||||
@@ -519,8 +522,7 @@
|
||||
- **iam_bindings_additive**: *reference([iam_bindings_additive](#refs-iam_bindings_additive))*
|
||||
- **iam_by_principals**: *reference([iam_by_principals](#refs-iam_by_principals))*
|
||||
- **kms_key**: *string*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: string*
|
||||
- **labels**: *reference([labels](#refs-labels))*
|
||||
- **message_retention_duration**: *string*
|
||||
- **regions**: *array*
|
||||
- items: *string*
|
||||
@@ -541,8 +543,7 @@
|
||||
- **iam**: *reference([iam](#refs-iam))*
|
||||
- **iam_bindings**: *reference([iam_bindings](#refs-iam_bindings))*
|
||||
- **iam_bindings_additive**: *reference([iam_bindings_additive](#refs-iam_bindings_additive))*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: string*
|
||||
- **labels**: *reference([labels](#refs-labels))*
|
||||
- **message_retention_duration**: *string*
|
||||
- **retain_acked_messages**: *boolean*
|
||||
- **bigquery**: *object*
|
||||
|
||||
@@ -239,8 +239,12 @@
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"description": "Labels for the object (optional).",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^[a-z][a-z0-9_-]{0,62}$": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_-]{0,63}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"max_workstations": {
|
||||
@@ -397,8 +401,12 @@
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"description": "Labels for the workstation (optional).",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^[a-z][a-z0-9_-]{0,62}$": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_-]{0,63}$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
- **iam_bindings_additive**: *object*
|
||||
<br>*additional properties: object*
|
||||
- **labels**: *object*
|
||||
<br>*additional properties: string*
|
||||
<br>*additional properties: false*
|
||||
- **`^[a-z][a-z0-9_-]{0,62}$`**: *string*
|
||||
<br>*pattern: ^[a-z0-9_-]{0,63}$*
|
||||
- **max_workstations**: *number*
|
||||
- **persistent_directories**: *array*
|
||||
- items: *object*
|
||||
|
||||
Reference in New Issue
Block a user