From 156493b8ccf6c8e5c0175dd7ed69ae3317250935 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:02:06 -0700 Subject: [PATCH] feat: Support adding constraints to new method types REMOVE_GRANTS and GOVERN_TAGS (#27336) --- .../lib/google/cloud/orgpolicy/v2/constraint_pb.rb | 2 +- .../proto_docs/google/cloud/orgpolicy/v2/constraint.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/google-cloud-org_policy-v2/lib/google/cloud/orgpolicy/v2/constraint_pb.rb b/google-cloud-org_policy-v2/lib/google/cloud/orgpolicy/v2/constraint_pb.rb index 7ee125d8e8b4..796dd8fec677 100644 --- a/google-cloud-org_policy-v2/lib/google/cloud/orgpolicy/v2/constraint_pb.rb +++ b/google-cloud-org_policy-v2/lib/google/cloud/orgpolicy/v2/constraint_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n*google/cloud/orgpolicy/v2/constraint.proto\x12\x19google.cloud.orgpolicy.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd1\x05\n\nConstraint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12S\n\x12\x63onstraint_default\x18\x04 \x01(\x0e\x32\x37.google.cloud.orgpolicy.v2.Constraint.ConstraintDefault\x12O\n\x0flist_constraint\x18\x05 \x01(\x0b\x32\x34.google.cloud.orgpolicy.v2.Constraint.ListConstraintH\x00\x12U\n\x12\x62oolean_constraint\x18\x06 \x01(\x0b\x32\x37.google.cloud.orgpolicy.v2.Constraint.BooleanConstraintH\x00\x12\x18\n\x10supports_dry_run\x18\x07 \x01(\x08\x1a=\n\x0eListConstraint\x12\x13\n\x0bsupports_in\x18\x01 \x01(\x08\x12\x16\n\x0esupports_under\x18\x02 \x01(\x08\x1a\x13\n\x11\x42ooleanConstraint\"L\n\x11\x43onstraintDefault\x12\"\n\x1e\x43ONSTRAINT_DEFAULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02:\xb8\x01\xea\x41\xb4\x01\n#orgpolicy.googleapis.com/Constraint\x12+projects/{project}/constraints/{constraint}\x12)folders/{folder}/constraints/{constraint}\x12\x35organizations/{organization}/constraints/{constraint}B\x11\n\x0f\x63onstraint_type\"\xd4\x04\n\x10\x43ustomConstraint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x1b\n\x0eresource_types\x18\x02 \x03(\tB\x03\xe0\x41\x05\x12L\n\x0cmethod_types\x18\x03 \x03(\x0e\x32\x36.google.cloud.orgpolicy.v2.CustomConstraint.MethodType\x12\x11\n\tcondition\x18\x04 \x01(\t\x12K\n\x0b\x61\x63tion_type\x18\x05 \x01(\x0e\x32\x36.google.cloud.orgpolicy.v2.CustomConstraint.ActionType\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"M\n\nMethodType\x12\x1b\n\x17METHOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\">\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02:r\xea\x41o\n)orgpolicy.googleapis.com/CustomConstraint\x12\x42organizations/{organization}/customConstraints/{custom_constraint}B\xc6\x01\n\x1d\x63om.google.cloud.orgpolicy.v2B\x0f\x43onstraintProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv2/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V2\xca\x02\x19Google\\Cloud\\OrgPolicy\\V2\xea\x02\x1cGoogle::Cloud::OrgPolicy::V2b\x06proto3" +descriptor_data = "\n*google/cloud/orgpolicy/v2/constraint.proto\x12\x19google.cloud.orgpolicy.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd1\x05\n\nConstraint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12S\n\x12\x63onstraint_default\x18\x04 \x01(\x0e\x32\x37.google.cloud.orgpolicy.v2.Constraint.ConstraintDefault\x12O\n\x0flist_constraint\x18\x05 \x01(\x0b\x32\x34.google.cloud.orgpolicy.v2.Constraint.ListConstraintH\x00\x12U\n\x12\x62oolean_constraint\x18\x06 \x01(\x0b\x32\x37.google.cloud.orgpolicy.v2.Constraint.BooleanConstraintH\x00\x12\x18\n\x10supports_dry_run\x18\x07 \x01(\x08\x1a=\n\x0eListConstraint\x12\x13\n\x0bsupports_in\x18\x01 \x01(\x08\x12\x16\n\x0esupports_under\x18\x02 \x01(\x08\x1a\x13\n\x11\x42ooleanConstraint\"L\n\x11\x43onstraintDefault\x12\"\n\x1e\x43ONSTRAINT_DEFAULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02:\xb8\x01\xea\x41\xb4\x01\n#orgpolicy.googleapis.com/Constraint\x12+projects/{project}/constraints/{constraint}\x12)folders/{folder}/constraints/{constraint}\x12\x35organizations/{organization}/constraints/{constraint}B\x11\n\x0f\x63onstraint_type\"\xf7\x04\n\x10\x43ustomConstraint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x1b\n\x0eresource_types\x18\x02 \x03(\tB\x03\xe0\x41\x05\x12L\n\x0cmethod_types\x18\x03 \x03(\x0e\x32\x36.google.cloud.orgpolicy.v2.CustomConstraint.MethodType\x12\x11\n\tcondition\x18\x04 \x01(\t\x12K\n\x0b\x61\x63tion_type\x18\x05 \x01(\x0e\x32\x36.google.cloud.orgpolicy.v2.CustomConstraint.ActionType\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"p\n\nMethodType\x12\x1b\n\x17METHOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x10\n\x0cREMOVE_GRANT\x10\x04\x12\x0f\n\x0bGOVERN_TAGS\x10\x05\">\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02:r\xea\x41o\n)orgpolicy.googleapis.com/CustomConstraint\x12\x42organizations/{organization}/customConstraints/{custom_constraint}B\xc6\x01\n\x1d\x63om.google.cloud.orgpolicy.v2B\x0f\x43onstraintProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv2/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V2\xca\x02\x19Google\\Cloud\\OrgPolicy\\V2\xea\x02\x1cGoogle::Cloud::OrgPolicy::V2b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-org_policy-v2/proto_docs/google/cloud/orgpolicy/v2/constraint.rb b/google-cloud-org_policy-v2/proto_docs/google/cloud/orgpolicy/v2/constraint.rb index 434217f51064..7fd83ab33ac6 100644 --- a/google-cloud-org_policy-v2/proto_docs/google/cloud/orgpolicy/v2/constraint.rb +++ b/google-cloud-org_policy-v2/proto_docs/google/cloud/orgpolicy/v2/constraint.rb @@ -192,6 +192,12 @@ module MethodType # Constraint applied when deleting the resource. # Not supported yet. DELETE = 3 + + # Constraint applied when removing an IAM grant. + REMOVE_GRANT = 4 + + # Constraint applied when enforcing forced tagging. + GOVERN_TAGS = 5 end # Allow or deny type.