Skip to content

Commit 59f3b3a

Browse files
feat: Automated regeneration of securitycenter v1 client (googleapis#20353)
Auto-created at 2024-10-06 09:54:49 +0000 using the toys pull request generator.
1 parent 9db860a commit 59f3b3a

File tree

6 files changed

+94
-251
lines changed

6 files changed

+94
-251
lines changed

api_names_out.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293715,6 +293715,7 @@
293715293715
"/securitycenter:v1/AzureMetadata/subscription": subscription
293716293716
"/securitycenter:v1/AzureMetadata/tenant": tenant
293717293717
"/securitycenter:v1/AzureResourceGroup": azure_resource_group
293718+
"/securitycenter:v1/AzureResourceGroup/id": id
293718293719
"/securitycenter:v1/AzureResourceGroup/name": name
293719293720
"/securitycenter:v1/AzureSubscription": azure_subscription
293720293721
"/securitycenter:v1/AzureSubscription/displayName": display_name
@@ -293752,6 +293753,8 @@
293752293753
"/securitycenter:v1/BulkMuteFindingsRequest/filter": filter
293753293754
"/securitycenter:v1/BulkMuteFindingsRequest/muteAnnotation": mute_annotation
293754293755
"/securitycenter:v1/BulkMuteFindingsRequest/muteState": mute_state
293756+
"/securitycenter:v1/CelPolicySpec": cel_policy_spec
293757+
"/securitycenter:v1/CelPolicySpec/spec": spec
293755293758
"/securitycenter:v1/CloudArmor": cloud_armor
293756293759
"/securitycenter:v1/CloudArmor/adaptiveProtection": adaptive_protection
293757293760
"/securitycenter:v1/CloudArmor/attack": attack
@@ -294019,6 +294022,7 @@
294019294022
"/securitycenter:v1/GoogleCloudSecuritycenterV1Binding/subjects/subject": subject
294020294023
"/securitycenter:v1/GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": google_cloud_securitycenter_v1_bulk_mute_findings_response
294021294024
"/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig": google_cloud_securitycenter_v1_custom_config
294025+
"/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/celPolicy": cel_policy
294022294026
"/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/customOutput": custom_output
294023294027
"/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/description": description
294024294028
"/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/predicate": predicate
@@ -294253,6 +294257,7 @@
294253294257
"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureMetadata/subscription": subscription
294254294258
"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureMetadata/tenant": tenant
294255294259
"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureResourceGroup": google_cloud_securitycenter_v2_azure_resource_group
294260+
"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureResourceGroup/id": id
294256294261
"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureResourceGroup/name": name
294257294262
"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureSubscription": google_cloud_securitycenter_v2_azure_subscription
294258294263
"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureSubscription/displayName": display_name

generated/google-apis-securitycenter_v1/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release history for google-apis-securitycenter_v1
22

3+
### v0.88.0 (2024-10-06)
4+
5+
* Regenerated from discovery document revision 20240926
6+
37
### v0.87.0 (2024-09-22)
48

59
* Regenerated from discovery document revision 20240916

generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/classes.rb

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,11 @@ def update!(**args)
848848
class AzureResourceGroup
849849
include Google::Apis::Core::Hashable
850850

851+
# The ID of the Azure resource group.
852+
# Corresponds to the JSON property `id`
853+
# @return [String]
854+
attr_accessor :id
855+
851856
# The name of the Azure resource group. This is not a UUID.
852857
# Corresponds to the JSON property `name`
853858
# @return [String]
@@ -859,6 +864,7 @@ def initialize(**args)
859864

860865
# Update properties of this object
861866
def update!(**args)
867+
@id = args[:id] if args.key?(:id)
862868
@name = args[:name] if args.key?(:name)
863869
end
864870
end
@@ -1195,6 +1201,40 @@ def update!(**args)
11951201
end
11961202
end
11971203

1204+
# YAML-based rule that uses CEL, which supports the declaration of variables and
1205+
# a filtering predicate. A vulnerable resource is emitted if the evaluation is
1206+
# false. Given: 1) the resource types as: - resource_types: "compute.googleapis.
1207+
# com/Instance" - resource_types: "compute.googleapis.com/Firewall" 2) the CEL
1208+
# policy spec as: name: bad_instance resource_filters: - name: instance
1209+
# resource_type: compute.googleapis.com/Instance filter: > instance.status == '
1210+
# RUNNING' && 'public' in instance.tags.items - name: firewall resource_type:
1211+
# compute.googleapis.com/Firewall filter: > firewall.direction == 'INGRESS' && !
1212+
# firewall.disabled && firewall.allowed.exists(rule, rule.IPProtocol.upperAscii()
1213+
# in ['TCP', 'ALL'] && rule.ports.exists(port, network.portsInRange(port, '11-
1214+
# 256'))) rule: match: - predicate: > instance.networkInterfaces.exists(net,
1215+
# firewall.network == net.network) output: > `'message': 'Compute instance with
1216+
# publicly accessible ports', 'instance': instance.name` Users are able to join
1217+
# resource types together using the exact format as Kubernetes Validating
1218+
# Admission policies.
1219+
class CelPolicySpec
1220+
include Google::Apis::Core::Hashable
1221+
1222+
# The CEL policy to evaluate to produce findings. A finding is generated when
1223+
# the policy validation evaluates to false.
1224+
# Corresponds to the JSON property `spec`
1225+
# @return [String]
1226+
attr_accessor :spec
1227+
1228+
def initialize(**args)
1229+
update!(**args)
1230+
end
1231+
1232+
# Update properties of this object
1233+
def update!(**args)
1234+
@spec = args[:spec] if args.key?(:spec)
1235+
end
1236+
end
1237+
11981238
# Fields related to Google Cloud Armor findings.
11991239
class CloudArmor
12001240
include Google::Apis::Core::Hashable
@@ -3095,6 +3135,25 @@ def update!(**args)
30953135
class GoogleCloudSecuritycenterV1CustomConfig
30963136
include Google::Apis::Core::Hashable
30973137

3138+
# YAML-based rule that uses CEL, which supports the declaration of variables and
3139+
# a filtering predicate. A vulnerable resource is emitted if the evaluation is
3140+
# false. Given: 1) the resource types as: - resource_types: "compute.googleapis.
3141+
# com/Instance" - resource_types: "compute.googleapis.com/Firewall" 2) the CEL
3142+
# policy spec as: name: bad_instance resource_filters: - name: instance
3143+
# resource_type: compute.googleapis.com/Instance filter: > instance.status == '
3144+
# RUNNING' && 'public' in instance.tags.items - name: firewall resource_type:
3145+
# compute.googleapis.com/Firewall filter: > firewall.direction == 'INGRESS' && !
3146+
# firewall.disabled && firewall.allowed.exists(rule, rule.IPProtocol.upperAscii()
3147+
# in ['TCP', 'ALL'] && rule.ports.exists(port, network.portsInRange(port, '11-
3148+
# 256'))) rule: match: - predicate: > instance.networkInterfaces.exists(net,
3149+
# firewall.network == net.network) output: > `'message': 'Compute instance with
3150+
# publicly accessible ports', 'instance': instance.name` Users are able to join
3151+
# resource types together using the exact format as Kubernetes Validating
3152+
# Admission policies.
3153+
# Corresponds to the JSON property `celPolicy`
3154+
# @return [Google::Apis::SecuritycenterV1::CelPolicySpec]
3155+
attr_accessor :cel_policy
3156+
30983157
# A set of optional name-value pairs that define custom source properties to
30993158
# return with each finding that is generated by the custom module. The custom
31003159
# source properties that are defined here are included in the finding JSON under
@@ -3153,6 +3212,7 @@ def initialize(**args)
31533212

31543213
# Update properties of this object
31553214
def update!(**args)
3215+
@cel_policy = args[:cel_policy] if args.key?(:cel_policy)
31563216
@custom_output = args[:custom_output] if args.key?(:custom_output)
31573217
@description = args[:description] if args.key?(:description)
31583218
@predicate = args[:predicate] if args.key?(:predicate)
@@ -4671,6 +4731,11 @@ def update!(**args)
46714731
class GoogleCloudSecuritycenterV2AzureResourceGroup
46724732
include Google::Apis::Core::Hashable
46734733

4734+
# The ID of the Azure resource group.
4735+
# Corresponds to the JSON property `id`
4736+
# @return [String]
4737+
attr_accessor :id
4738+
46744739
# The name of the Azure resource group. This is not a UUID.
46754740
# Corresponds to the JSON property `name`
46764741
# @return [String]
@@ -4682,6 +4747,7 @@ def initialize(**args)
46824747

46834748
# Update properties of this object
46844749
def update!(**args)
4750+
@id = args[:id] if args.key?(:id)
46854751
@name = args[:name] if args.key?(:name)
46864752
end
46874753
end

generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/gem_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module SecuritycenterV1
1818
# Version of the google-apis-securitycenter_v1 gem
19-
GEM_VERSION = "0.87.0"
19+
GEM_VERSION = "0.88.0"
2020

2121
# Version of the code generator used to generate this client
2222
GENERATOR_VERSION = "0.15.1"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20240916"
25+
REVISION = "20240926"
2626
end
2727
end
2828
end

generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/representations.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
190190
include Google::Apis::Core::JsonObjectSupport
191191
end
192192

193+
class CelPolicySpec
194+
class Representation < Google::Apis::Core::JsonRepresentation; end
195+
196+
include Google::Apis::Core::JsonObjectSupport
197+
end
198+
193199
class CloudArmor
194200
class Representation < Google::Apis::Core::JsonRepresentation; end
195201

@@ -1804,6 +1810,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
18041810
class AzureResourceGroup
18051811
# @private
18061812
class Representation < Google::Apis::Core::JsonRepresentation
1813+
property :id, as: 'id'
18071814
property :name, as: 'name'
18081815
end
18091816
end
@@ -1875,6 +1882,13 @@ class Representation < Google::Apis::Core::JsonRepresentation
18751882
end
18761883
end
18771884

1885+
class CelPolicySpec
1886+
# @private
1887+
class Representation < Google::Apis::Core::JsonRepresentation
1888+
property :spec, as: 'spec'
1889+
end
1890+
end
1891+
18781892
class CloudArmor
18791893
# @private
18801894
class Representation < Google::Apis::Core::JsonRepresentation
@@ -2352,6 +2366,8 @@ class Representation < Google::Apis::Core::JsonRepresentation
23522366
class GoogleCloudSecuritycenterV1CustomConfig
23532367
# @private
23542368
class Representation < Google::Apis::Core::JsonRepresentation
2369+
property :cel_policy, as: 'celPolicy', class: Google::Apis::SecuritycenterV1::CelPolicySpec, decorator: Google::Apis::SecuritycenterV1::CelPolicySpec::Representation
2370+
23552371
property :custom_output, as: 'customOutput', class: Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1CustomOutputSpec, decorator: Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1CustomOutputSpec::Representation
23562372

23572373
property :description, as: 'description'
@@ -2722,6 +2738,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
27222738
class GoogleCloudSecuritycenterV2AzureResourceGroup
27232739
# @private
27242740
class Representation < Google::Apis::Core::JsonRepresentation
2741+
property :id, as: 'id'
27252742
property :name, as: 'name'
27262743
end
27272744
end

0 commit comments

Comments
 (0)