Skip to content

Commit c5b31ef

Browse files
yoshi-automationsofisl
authored andcommitted
feat(policysimulator): update the API
#### policysimulator:v1alpha The following keys were added: - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.additionalProperties.description - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.additionalProperties.type - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.description - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.type The following keys were changed: - schemas.GoogleCloudOrgpolicyV2AlternatePolicySpec.description - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.actionType.enumDescriptions - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.condition.description - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.methodTypes.items.enumDescriptions - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.updateTime.description - schemas.GoogleCloudOrgpolicyV2Policy.properties.spec.description #### policysimulator:v1beta The following keys were added: - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.additionalProperties.description - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.additionalProperties.type - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.description - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.type The following keys were changed: - schemas.GoogleCloudOrgpolicyV2AlternatePolicySpec.description - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.actionType.enumDescriptions - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.condition.description - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.methodTypes.items.enumDescriptions - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.updateTime.description - schemas.GoogleCloudOrgpolicyV2Policy.properties.spec.description #### policysimulator:v1 The following keys were added: - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.additionalProperties.description - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.additionalProperties.type - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.description - schemas.GoogleCloudOrgpolicyV2PolicySpecPolicyRule.properties.parameters.type The following keys were changed: - schemas.GoogleCloudOrgpolicyV2AlternatePolicySpec.description - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.actionType.enumDescriptions - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.condition.description - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.methodTypes.items.enumDescriptions - schemas.GoogleCloudOrgpolicyV2CustomConstraint.properties.updateTime.description - schemas.GoogleCloudOrgpolicyV2Policy.properties.spec.description
1 parent 917780a commit c5b31ef

File tree

4 files changed

+56
-28
lines changed

4 files changed

+56
-28
lines changed

‎discovery/policysimulator-v1.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -806,11 +806,11 @@
806806
}
807807
}
808808
},
809-
"revision": "20240623",
809+
"revision": "20250119",
810810
"rootUrl": "https://policysimulator.googleapis.com/",
811811
"schemas": {
812812
"GoogleCloudOrgpolicyV2AlternatePolicySpec": {
813-
"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.",
813+
"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run.",
814814
"id": "GoogleCloudOrgpolicyV2AlternatePolicySpec",
815815
"properties": {
816816
"launch": {
@@ -836,14 +836,14 @@
836836
"DENY"
837837
],
838838
"enumDescriptions": [
839-
"Unspecified. Results in an error.",
839+
"This is only used for distinguishing unset values and should never be used. Results in an error.",
840840
"Allowed action type.",
841841
"Deny action type."
842842
],
843843
"type": "string"
844844
},
845845
"condition": {
846-
"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.",
846+
"description": "A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.",
847847
"type": "string"
848848
},
849849
"description": {
@@ -866,10 +866,10 @@
866866
"GOVERN_TAGS"
867867
],
868868
"enumDescriptions": [
869-
"Unspecified. Results in an error.",
869+
"This is only used for distinguishing unset values and should never be used. Results in an error.",
870870
"Constraint applied when creating the resource.",
871871
"Constraint applied when updating the resource.",
872-
"Constraint applied when deleting the resource. Not supported yet.",
872+
"Constraint applied when deleting the resource. Not currently supported.",
873873
"Constraint applied when removing an IAM grant.",
874874
"Constraint applied when enforcing forced tagging."
875875
],
@@ -889,7 +889,7 @@
889889
"type": "array"
890890
},
891891
"updateTime": {
892-
"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called",
892+
"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.",
893893
"format": "google-datetime",
894894
"readOnly": true,
895895
"type": "string"
@@ -920,7 +920,7 @@
920920
},
921921
"spec": {
922922
"$ref": "GoogleCloudOrgpolicyV2PolicySpec",
923-
"description": "Basic information about the Organization Policy."
923+
"description": "Basic information about the organization policy."
924924
}
925925
},
926926
"type": "object"
@@ -977,6 +977,14 @@
977977
"description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.",
978978
"type": "boolean"
979979
},
980+
"parameters": {
981+
"additionalProperties": {
982+
"description": "Properties of the object.",
983+
"type": "any"
984+
},
985+
"description": "Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }",
986+
"type": "object"
987+
},
980988
"values": {
981989
"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues",
982990
"description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints."

‎discovery/policysimulator-v1alpha.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,11 +1078,11 @@
10781078
}
10791079
}
10801080
},
1081-
"revision": "20240505",
1081+
"revision": "20250119",
10821082
"rootUrl": "https://policysimulator.googleapis.com/",
10831083
"schemas": {
10841084
"GoogleCloudOrgpolicyV2AlternatePolicySpec": {
1085-
"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.",
1085+
"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run.",
10861086
"id": "GoogleCloudOrgpolicyV2AlternatePolicySpec",
10871087
"properties": {
10881088
"launch": {
@@ -1108,14 +1108,14 @@
11081108
"DENY"
11091109
],
11101110
"enumDescriptions": [
1111-
"Unspecified. Results in an error.",
1111+
"This is only used for distinguishing unset values and should never be used. Results in an error.",
11121112
"Allowed action type.",
11131113
"Deny action type."
11141114
],
11151115
"type": "string"
11161116
},
11171117
"condition": {
1118-
"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.",
1118+
"description": "A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.",
11191119
"type": "string"
11201120
},
11211121
"description": {
@@ -1138,10 +1138,10 @@
11381138
"GOVERN_TAGS"
11391139
],
11401140
"enumDescriptions": [
1141-
"Unspecified. Results in an error.",
1141+
"This is only used for distinguishing unset values and should never be used. Results in an error.",
11421142
"Constraint applied when creating the resource.",
11431143
"Constraint applied when updating the resource.",
1144-
"Constraint applied when deleting the resource. Not supported yet.",
1144+
"Constraint applied when deleting the resource. Not currently supported.",
11451145
"Constraint applied when removing an IAM grant.",
11461146
"Constraint applied when enforcing forced tagging."
11471147
],
@@ -1161,7 +1161,7 @@
11611161
"type": "array"
11621162
},
11631163
"updateTime": {
1164-
"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called",
1164+
"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.",
11651165
"format": "google-datetime",
11661166
"readOnly": true,
11671167
"type": "string"
@@ -1192,7 +1192,7 @@
11921192
},
11931193
"spec": {
11941194
"$ref": "GoogleCloudOrgpolicyV2PolicySpec",
1195-
"description": "Basic information about the Organization Policy."
1195+
"description": "Basic information about the organization policy."
11961196
}
11971197
},
11981198
"type": "object"
@@ -1249,6 +1249,14 @@
12491249
"description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.",
12501250
"type": "boolean"
12511251
},
1252+
"parameters": {
1253+
"additionalProperties": {
1254+
"description": "Properties of the object.",
1255+
"type": "any"
1256+
},
1257+
"description": "Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }",
1258+
"type": "object"
1259+
},
12521260
"values": {
12531261
"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues",
12541262
"description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints."

‎discovery/policysimulator-v1beta.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,11 +1078,11 @@
10781078
}
10791079
}
10801080
},
1081-
"revision": "20240505",
1081+
"revision": "20250119",
10821082
"rootUrl": "https://policysimulator.googleapis.com/",
10831083
"schemas": {
10841084
"GoogleCloudOrgpolicyV2AlternatePolicySpec": {
1085-
"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.",
1085+
"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run.",
10861086
"id": "GoogleCloudOrgpolicyV2AlternatePolicySpec",
10871087
"properties": {
10881088
"launch": {
@@ -1108,14 +1108,14 @@
11081108
"DENY"
11091109
],
11101110
"enumDescriptions": [
1111-
"Unspecified. Results in an error.",
1111+
"This is only used for distinguishing unset values and should never be used. Results in an error.",
11121112
"Allowed action type.",
11131113
"Deny action type."
11141114
],
11151115
"type": "string"
11161116
},
11171117
"condition": {
1118-
"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.",
1118+
"description": "A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.",
11191119
"type": "string"
11201120
},
11211121
"description": {
@@ -1138,10 +1138,10 @@
11381138
"GOVERN_TAGS"
11391139
],
11401140
"enumDescriptions": [
1141-
"Unspecified. Results in an error.",
1141+
"This is only used for distinguishing unset values and should never be used. Results in an error.",
11421142
"Constraint applied when creating the resource.",
11431143
"Constraint applied when updating the resource.",
1144-
"Constraint applied when deleting the resource. Not supported yet.",
1144+
"Constraint applied when deleting the resource. Not currently supported.",
11451145
"Constraint applied when removing an IAM grant.",
11461146
"Constraint applied when enforcing forced tagging."
11471147
],
@@ -1161,7 +1161,7 @@
11611161
"type": "array"
11621162
},
11631163
"updateTime": {
1164-
"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called",
1164+
"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.",
11651165
"format": "google-datetime",
11661166
"readOnly": true,
11671167
"type": "string"
@@ -1192,7 +1192,7 @@
11921192
},
11931193
"spec": {
11941194
"$ref": "GoogleCloudOrgpolicyV2PolicySpec",
1195-
"description": "Basic information about the Organization Policy."
1195+
"description": "Basic information about the organization policy."
11961196
}
11971197
},
11981198
"type": "object"
@@ -1249,6 +1249,14 @@
12491249
"description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.",
12501250
"type": "boolean"
12511251
},
1252+
"parameters": {
1253+
"additionalProperties": {
1254+
"description": "Properties of the object.",
1255+
"type": "any"
1256+
},
1257+
"description": "Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }",
1258+
"type": "object"
1259+
},
12521260
"values": {
12531261
"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues",
12541262
"description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints."

‎src/apis/policysimulator/v1.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export namespace policysimulator_v1 {
131131
}
132132

133133
/**
134-
* Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.
134+
* Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run.
135135
*/
136136
export interface Schema$GoogleCloudOrgpolicyV2AlternatePolicySpec {
137137
/**
@@ -152,7 +152,7 @@ export namespace policysimulator_v1 {
152152
*/
153153
actionType?: string | null;
154154
/**
155-
* Org policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
155+
* A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
156156
*/
157157
condition?: string | null;
158158
/**
@@ -176,7 +176,7 @@ export namespace policysimulator_v1 {
176176
*/
177177
resourceTypes?: string[] | null;
178178
/**
179-
* Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called
179+
* Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
180180
*/
181181
updateTime?: string | null;
182182
}
@@ -201,7 +201,7 @@ export namespace policysimulator_v1 {
201201
*/
202202
name?: string | null;
203203
/**
204-
* Basic information about the Organization Policy.
204+
* Basic information about the organization policy.
205205
*/
206206
spec?: Schema$GoogleCloudOrgpolicyV2PolicySpec;
207207
}
@@ -250,6 +250,10 @@ export namespace policysimulator_v1 {
250250
* If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.
251251
*/
252252
enforce?: boolean | null;
253+
/**
254+
* Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true \}
255+
*/
256+
parameters?: {[key: string]: any} | null;
253257
/**
254258
* List of values to be used for this policy rule. This field can be set only in policies for list constraints.
255259
*/

0 commit comments

Comments
 (0)