From ac7a596edc8bbf821aaeb84d2b8e0fd5e72b775f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 2 Apr 2024 07:08:27 +0000 Subject: [PATCH] feat(orgpolicy): update the api #### orgpolicy:v2 The following keys were added: - schemas.GoogleCloudOrgpolicyV2Constraint.properties.customConstraint.$ref (Total Keys: 1) - schemas.GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint (Total Keys: 8) --- .../dyn/orgpolicy_v2.folders.constraints.html | 10 ++++ ...rgpolicy_v2.organizations.constraints.html | 10 ++++ .../orgpolicy_v2.projects.constraints.html | 10 ++++ .../documents/orgpolicy.v2.json | 57 ++++++++++++++++++- 4 files changed, 86 insertions(+), 1 deletion(-) diff --git a/docs/dyn/orgpolicy_v2.folders.constraints.html b/docs/dyn/orgpolicy_v2.folders.constraints.html index d8979b8b995..2a8070e2978 100644 --- a/docs/dyn/orgpolicy_v2.folders.constraints.html +++ b/docs/dyn/orgpolicy_v2.folders.constraints.html @@ -111,6 +111,16 @@

Method Details

"booleanConstraint": { # A constraint that is either enforced or not. For example, a constraint `constraints/compute.disableSerialPortAccess`. If it is enforced on a VM instance, serial port connections will not be opened to that instance. # Defines this constraint as being a BooleanConstraint. }, "constraintDefault": "A String", # The evaluation behavior of this constraint in the absence of a policy. + "customConstraint": { # A Google defined custom constraint. This represents a subset of fields missing from Constraint proto that are required to describe CustomConstraint # Defines this constraint as being a CustomConstraint. + "actionType": "A String", # Allow or deny type. + "condition": "A String", # 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. + "methodTypes": [ # All the operations being applied for this constraint. + "A String", + ], + "resourceTypes": [ # The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`. + "A String", + ], + }, "description": "A String", # Detailed description of what this constraint controls as well as how and where it is enforced. Mutable. "displayName": "A String", # The human readable name. Mutable. "listConstraint": { # A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy. # Defines this constraint as being a ListConstraint. diff --git a/docs/dyn/orgpolicy_v2.organizations.constraints.html b/docs/dyn/orgpolicy_v2.organizations.constraints.html index 11d8b468531..218b10c0235 100644 --- a/docs/dyn/orgpolicy_v2.organizations.constraints.html +++ b/docs/dyn/orgpolicy_v2.organizations.constraints.html @@ -111,6 +111,16 @@

Method Details

"booleanConstraint": { # A constraint that is either enforced or not. For example, a constraint `constraints/compute.disableSerialPortAccess`. If it is enforced on a VM instance, serial port connections will not be opened to that instance. # Defines this constraint as being a BooleanConstraint. }, "constraintDefault": "A String", # The evaluation behavior of this constraint in the absence of a policy. + "customConstraint": { # A Google defined custom constraint. This represents a subset of fields missing from Constraint proto that are required to describe CustomConstraint # Defines this constraint as being a CustomConstraint. + "actionType": "A String", # Allow or deny type. + "condition": "A String", # 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. + "methodTypes": [ # All the operations being applied for this constraint. + "A String", + ], + "resourceTypes": [ # The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`. + "A String", + ], + }, "description": "A String", # Detailed description of what this constraint controls as well as how and where it is enforced. Mutable. "displayName": "A String", # The human readable name. Mutable. "listConstraint": { # A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy. # Defines this constraint as being a ListConstraint. diff --git a/docs/dyn/orgpolicy_v2.projects.constraints.html b/docs/dyn/orgpolicy_v2.projects.constraints.html index fc9b70a64da..fea5ee47324 100644 --- a/docs/dyn/orgpolicy_v2.projects.constraints.html +++ b/docs/dyn/orgpolicy_v2.projects.constraints.html @@ -111,6 +111,16 @@

Method Details

"booleanConstraint": { # A constraint that is either enforced or not. For example, a constraint `constraints/compute.disableSerialPortAccess`. If it is enforced on a VM instance, serial port connections will not be opened to that instance. # Defines this constraint as being a BooleanConstraint. }, "constraintDefault": "A String", # The evaluation behavior of this constraint in the absence of a policy. + "customConstraint": { # A Google defined custom constraint. This represents a subset of fields missing from Constraint proto that are required to describe CustomConstraint # Defines this constraint as being a CustomConstraint. + "actionType": "A String", # Allow or deny type. + "condition": "A String", # 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. + "methodTypes": [ # All the operations being applied for this constraint. + "A String", + ], + "resourceTypes": [ # The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`. + "A String", + ], + }, "description": "A String", # Detailed description of what this constraint controls as well as how and where it is enforced. Mutable. "displayName": "A String", # The human readable name. Mutable. "listConstraint": { # A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy. # Defines this constraint as being a ListConstraint. diff --git a/googleapiclient/discovery_cache/documents/orgpolicy.v2.json b/googleapiclient/discovery_cache/documents/orgpolicy.v2.json index 53d3688eb15..b12bf2657a4 100644 --- a/googleapiclient/discovery_cache/documents/orgpolicy.v2.json +++ b/googleapiclient/discovery_cache/documents/orgpolicy.v2.json @@ -930,7 +930,7 @@ } } }, -"revision": "20240318", +"revision": "20240325", "rootUrl": "https://orgpolicy.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -970,6 +970,10 @@ ], "type": "string" }, +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint", +"description": "Defines this constraint as being a CustomConstraint." +}, "description": { "description": "Detailed description of what this constraint controls as well as how and where it is enforced. Mutable.", "type": "string" @@ -999,6 +1003,57 @@ "properties": {}, "type": "object" }, +"GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint": { +"description": "A Google defined custom constraint. This represents a subset of fields missing from Constraint proto that are required to describe CustomConstraint", +"id": "GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint", +"properties": { +"actionType": { +"description": "Allow or deny type.", +"enum": [ +"ACTION_TYPE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Allowed action type.", +"Deny action type." +], +"type": "string" +}, +"condition": { +"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.", +"type": "string" +}, +"methodTypes": { +"description": "All the operations being applied for this constraint.", +"items": { +"enum": [ +"METHOD_TYPE_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Constraint applied when creating the resource.", +"Constraint applied when updating the resource.", +"Constraint applied when deleting the resource. Not supported yet." +], +"type": "string" +}, +"type": "array" +}, +"resourceTypes": { +"description": "The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, "GoogleCloudOrgpolicyV2ConstraintListConstraint": { "description": "A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy.", "id": "GoogleCloudOrgpolicyV2ConstraintListConstraint",