From 59f3b3aad7ededfcf6cda25bfcc3af688b07c4b3 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Sun, 6 Oct 2024 03:00:42 -0700 Subject: [PATCH] feat: Automated regeneration of securitycenter v1 client (#20353) Auto-created at 2024-10-06 09:54:49 +0000 using the toys pull request generator. --- api_names_out.yaml | 5 + .../CHANGELOG.md | 4 + .../google/apis/securitycenter_v1/classes.rb | 66 +++++ .../apis/securitycenter_v1/gem_version.rb | 4 +- .../apis/securitycenter_v1/representations.rb | 17 ++ .../google/apis/securitycenter_v1/service.rb | 249 ------------------ 6 files changed, 94 insertions(+), 251 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 0609ca5548e..661f49d4fc2 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -293715,6 +293715,7 @@ "/securitycenter:v1/AzureMetadata/subscription": subscription "/securitycenter:v1/AzureMetadata/tenant": tenant "/securitycenter:v1/AzureResourceGroup": azure_resource_group +"/securitycenter:v1/AzureResourceGroup/id": id "/securitycenter:v1/AzureResourceGroup/name": name "/securitycenter:v1/AzureSubscription": azure_subscription "/securitycenter:v1/AzureSubscription/displayName": display_name @@ -293752,6 +293753,8 @@ "/securitycenter:v1/BulkMuteFindingsRequest/filter": filter "/securitycenter:v1/BulkMuteFindingsRequest/muteAnnotation": mute_annotation "/securitycenter:v1/BulkMuteFindingsRequest/muteState": mute_state +"/securitycenter:v1/CelPolicySpec": cel_policy_spec +"/securitycenter:v1/CelPolicySpec/spec": spec "/securitycenter:v1/CloudArmor": cloud_armor "/securitycenter:v1/CloudArmor/adaptiveProtection": adaptive_protection "/securitycenter:v1/CloudArmor/attack": attack @@ -294019,6 +294022,7 @@ "/securitycenter:v1/GoogleCloudSecuritycenterV1Binding/subjects/subject": subject "/securitycenter:v1/GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": google_cloud_securitycenter_v1_bulk_mute_findings_response "/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig": google_cloud_securitycenter_v1_custom_config +"/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/celPolicy": cel_policy "/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/customOutput": custom_output "/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/description": description "/securitycenter:v1/GoogleCloudSecuritycenterV1CustomConfig/predicate": predicate @@ -294253,6 +294257,7 @@ "/securitycenter:v1/GoogleCloudSecuritycenterV2AzureMetadata/subscription": subscription "/securitycenter:v1/GoogleCloudSecuritycenterV2AzureMetadata/tenant": tenant "/securitycenter:v1/GoogleCloudSecuritycenterV2AzureResourceGroup": google_cloud_securitycenter_v2_azure_resource_group +"/securitycenter:v1/GoogleCloudSecuritycenterV2AzureResourceGroup/id": id "/securitycenter:v1/GoogleCloudSecuritycenterV2AzureResourceGroup/name": name "/securitycenter:v1/GoogleCloudSecuritycenterV2AzureSubscription": google_cloud_securitycenter_v2_azure_subscription "/securitycenter:v1/GoogleCloudSecuritycenterV2AzureSubscription/displayName": display_name diff --git a/generated/google-apis-securitycenter_v1/CHANGELOG.md b/generated/google-apis-securitycenter_v1/CHANGELOG.md index 1d80d8e41e8..8f561c9589b 100644 --- a/generated/google-apis-securitycenter_v1/CHANGELOG.md +++ b/generated/google-apis-securitycenter_v1/CHANGELOG.md @@ -1,5 +1,9 @@ # Release history for google-apis-securitycenter_v1 +### v0.88.0 (2024-10-06) + +* Regenerated from discovery document revision 20240926 + ### v0.87.0 (2024-09-22) * Regenerated from discovery document revision 20240916 diff --git a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/classes.rb b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/classes.rb index e2be174b9c6..0796303290c 100644 --- a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/classes.rb +++ b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/classes.rb @@ -848,6 +848,11 @@ def update!(**args) class AzureResourceGroup include Google::Apis::Core::Hashable + # The ID of the Azure resource group. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + # The name of the Azure resource group. This is not a UUID. # Corresponds to the JSON property `name` # @return [String] @@ -859,6 +864,7 @@ def initialize(**args) # Update properties of this object def update!(**args) + @id = args[:id] if args.key?(:id) @name = args[:name] if args.key?(:name) end end @@ -1195,6 +1201,40 @@ def update!(**args) end end + # YAML-based rule that uses CEL, which supports the declaration of variables and + # a filtering predicate. A vulnerable resource is emitted if the evaluation is + # false. Given: 1) the resource types as: - resource_types: "compute.googleapis. + # com/Instance" - resource_types: "compute.googleapis.com/Firewall" 2) the CEL + # policy spec as: name: bad_instance resource_filters: - name: instance + # resource_type: compute.googleapis.com/Instance filter: > instance.status == ' + # RUNNING' && 'public' in instance.tags.items - name: firewall resource_type: + # compute.googleapis.com/Firewall filter: > firewall.direction == 'INGRESS' && ! + # firewall.disabled && firewall.allowed.exists(rule, rule.IPProtocol.upperAscii() + # in ['TCP', 'ALL'] && rule.ports.exists(port, network.portsInRange(port, '11- + # 256'))) rule: match: - predicate: > instance.networkInterfaces.exists(net, + # firewall.network == net.network) output: > `'message': 'Compute instance with + # publicly accessible ports', 'instance': instance.name` Users are able to join + # resource types together using the exact format as Kubernetes Validating + # Admission policies. + class CelPolicySpec + include Google::Apis::Core::Hashable + + # The CEL policy to evaluate to produce findings. A finding is generated when + # the policy validation evaluates to false. + # Corresponds to the JSON property `spec` + # @return [String] + attr_accessor :spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spec = args[:spec] if args.key?(:spec) + end + end + # Fields related to Google Cloud Armor findings. class CloudArmor include Google::Apis::Core::Hashable @@ -3095,6 +3135,25 @@ def update!(**args) class GoogleCloudSecuritycenterV1CustomConfig include Google::Apis::Core::Hashable + # YAML-based rule that uses CEL, which supports the declaration of variables and + # a filtering predicate. A vulnerable resource is emitted if the evaluation is + # false. Given: 1) the resource types as: - resource_types: "compute.googleapis. + # com/Instance" - resource_types: "compute.googleapis.com/Firewall" 2) the CEL + # policy spec as: name: bad_instance resource_filters: - name: instance + # resource_type: compute.googleapis.com/Instance filter: > instance.status == ' + # RUNNING' && 'public' in instance.tags.items - name: firewall resource_type: + # compute.googleapis.com/Firewall filter: > firewall.direction == 'INGRESS' && ! + # firewall.disabled && firewall.allowed.exists(rule, rule.IPProtocol.upperAscii() + # in ['TCP', 'ALL'] && rule.ports.exists(port, network.portsInRange(port, '11- + # 256'))) rule: match: - predicate: > instance.networkInterfaces.exists(net, + # firewall.network == net.network) output: > `'message': 'Compute instance with + # publicly accessible ports', 'instance': instance.name` Users are able to join + # resource types together using the exact format as Kubernetes Validating + # Admission policies. + # Corresponds to the JSON property `celPolicy` + # @return [Google::Apis::SecuritycenterV1::CelPolicySpec] + attr_accessor :cel_policy + # A set of optional name-value pairs that define custom source properties to # return with each finding that is generated by the custom module. The custom # source properties that are defined here are included in the finding JSON under @@ -3153,6 +3212,7 @@ def initialize(**args) # Update properties of this object def update!(**args) + @cel_policy = args[:cel_policy] if args.key?(:cel_policy) @custom_output = args[:custom_output] if args.key?(:custom_output) @description = args[:description] if args.key?(:description) @predicate = args[:predicate] if args.key?(:predicate) @@ -4671,6 +4731,11 @@ def update!(**args) class GoogleCloudSecuritycenterV2AzureResourceGroup include Google::Apis::Core::Hashable + # The ID of the Azure resource group. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + # The name of the Azure resource group. This is not a UUID. # Corresponds to the JSON property `name` # @return [String] @@ -4682,6 +4747,7 @@ def initialize(**args) # Update properties of this object def update!(**args) + @id = args[:id] if args.key?(:id) @name = args[:name] if args.key?(:name) end end diff --git a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/gem_version.rb b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/gem_version.rb index 5d644e4f227..3012ac9004f 100644 --- a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/gem_version.rb +++ b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/gem_version.rb @@ -16,13 +16,13 @@ module Google module Apis module SecuritycenterV1 # Version of the google-apis-securitycenter_v1 gem - GEM_VERSION = "0.87.0" + GEM_VERSION = "0.88.0" # Version of the code generator used to generate this client GENERATOR_VERSION = "0.15.1" # Revision of the discovery document this client was generated from - REVISION = "20240916" + REVISION = "20240926" end end end diff --git a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/representations.rb b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/representations.rb index 1f495a97502..40059c41313 100644 --- a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/representations.rb +++ b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/representations.rb @@ -190,6 +190,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class CelPolicySpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CloudArmor class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1804,6 +1810,7 @@ class Representation < Google::Apis::Core::JsonRepresentation class AzureResourceGroup # @private class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' property :name, as: 'name' end end @@ -1875,6 +1882,13 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class CelPolicySpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spec, as: 'spec' + end + end + class CloudArmor # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2352,6 +2366,8 @@ class Representation < Google::Apis::Core::JsonRepresentation class GoogleCloudSecuritycenterV1CustomConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :cel_policy, as: 'celPolicy', class: Google::Apis::SecuritycenterV1::CelPolicySpec, decorator: Google::Apis::SecuritycenterV1::CelPolicySpec::Representation + property :custom_output, as: 'customOutput', class: Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1CustomOutputSpec, decorator: Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1CustomOutputSpec::Representation property :description, as: 'description' @@ -2722,6 +2738,7 @@ class Representation < Google::Apis::Core::JsonRepresentation class GoogleCloudSecuritycenterV2AzureResourceGroup # @private class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' property :name, as: 'name' end end diff --git a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/service.rb b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/service.rb index b25cf75e700..322af5eb71a 100644 --- a/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/service.rb +++ b/generated/google-apis-securitycenter_v1/lib/google/apis/securitycenter_v1/service.rb @@ -845,47 +845,6 @@ def bulk_folder_finding_mute(parent, bulk_mute_findings_request_object = nil, fi execute_or_queue_command(command, &block) end - # Creates a mute config. - # @param [String] parent - # Required. Resource name of the new mute configs's parent. Its format is ` - # organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[ - # project_id]`. - # @param [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] google_cloud_securitycenter_v1_mute_config_object - # @param [String] mute_config_id - # Required. Unique identifier provided by the client within the parent scope. It - # must consist of only lowercase letters, numbers, and hyphens, must start with - # a letter, must end with either a letter or a number, and must be 63 characters - # or less. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_folder_location_mute_config(parent, google_cloud_securitycenter_v1_mute_config_object = nil, mute_config_id: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+parent}/muteConfigs', options) - command.request_representation = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig::Representation - command.request_object = google_cloud_securitycenter_v1_mute_config_object - command.response_representation = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig::Representation - command.response_class = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig - command.params['parent'] = parent unless parent.nil? - command.query['muteConfigId'] = mute_config_id unless mute_config_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Deletes an existing mute config. # @param [String] name # Required. Name of the mute config to delete. Its format is `organizations/` @@ -956,48 +915,6 @@ def get_folder_location_mute_config(name, fields: nil, quota_user: nil, options: execute_or_queue_command(command, &block) end - # Lists mute configs. - # @param [String] parent - # Required. The parent, which owns the collection of mute configs. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[ - # project_id]`. - # @param [Fixnum] page_size - # The maximum number of configs to return. The service may return fewer than - # this value. If unspecified, at most 10 configs will be returned. The maximum - # value is 1000; values above 1000 will be coerced to 1000. - # @param [String] page_token - # A page token, received from a previous `ListMuteConfigs` call. Provide this to - # retrieve the subsequent page. When paginating, all other parameters provided - # to `ListMuteConfigs` must match the call that provided the page token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SecuritycenterV1::ListMuteConfigsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SecuritycenterV1::ListMuteConfigsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_folder_location_mute_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+parent}', options) - command.response_representation = Google::Apis::SecuritycenterV1::ListMuteConfigsResponse::Representation - command.response_class = Google::Apis::SecuritycenterV1::ListMuteConfigsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Updates a mute config. # @param [String] name # This field will be ignored if provided on config creation. Format ` @@ -3077,47 +2994,6 @@ def bulk_organization_finding_mute(parent, bulk_mute_findings_request_object = n execute_or_queue_command(command, &block) end - # Creates a mute config. - # @param [String] parent - # Required. Resource name of the new mute configs's parent. Its format is ` - # organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[ - # project_id]`. - # @param [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] google_cloud_securitycenter_v1_mute_config_object - # @param [String] mute_config_id - # Required. Unique identifier provided by the client within the parent scope. It - # must consist of only lowercase letters, numbers, and hyphens, must start with - # a letter, must end with either a letter or a number, and must be 63 characters - # or less. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_organization_location_mute_config(parent, google_cloud_securitycenter_v1_mute_config_object = nil, mute_config_id: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+parent}/muteConfigs', options) - command.request_representation = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig::Representation - command.request_object = google_cloud_securitycenter_v1_mute_config_object - command.response_representation = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig::Representation - command.response_class = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig - command.params['parent'] = parent unless parent.nil? - command.query['muteConfigId'] = mute_config_id unless mute_config_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Deletes an existing mute config. # @param [String] name # Required. Name of the mute config to delete. Its format is `organizations/` @@ -3188,48 +3064,6 @@ def get_organization_location_mute_config(name, fields: nil, quota_user: nil, op execute_or_queue_command(command, &block) end - # Lists mute configs. - # @param [String] parent - # Required. The parent, which owns the collection of mute configs. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[ - # project_id]`. - # @param [Fixnum] page_size - # The maximum number of configs to return. The service may return fewer than - # this value. If unspecified, at most 10 configs will be returned. The maximum - # value is 1000; values above 1000 will be coerced to 1000. - # @param [String] page_token - # A page token, received from a previous `ListMuteConfigs` call. Provide this to - # retrieve the subsequent page. When paginating, all other parameters provided - # to `ListMuteConfigs` must match the call that provided the page token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SecuritycenterV1::ListMuteConfigsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SecuritycenterV1::ListMuteConfigsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_organization_location_mute_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+parent}', options) - command.response_representation = Google::Apis::SecuritycenterV1::ListMuteConfigsResponse::Representation - command.response_class = Google::Apis::SecuritycenterV1::ListMuteConfigsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Updates a mute config. # @param [String] name # This field will be ignored if provided on config creation. Format ` @@ -6138,47 +5972,6 @@ def bulk_project_finding_mute(parent, bulk_mute_findings_request_object = nil, f execute_or_queue_command(command, &block) end - # Creates a mute config. - # @param [String] parent - # Required. Resource name of the new mute configs's parent. Its format is ` - # organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[ - # project_id]`. - # @param [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] google_cloud_securitycenter_v1_mute_config_object - # @param [String] mute_config_id - # Required. Unique identifier provided by the client within the parent scope. It - # must consist of only lowercase letters, numbers, and hyphens, must start with - # a letter, must end with either a letter or a number, and must be 63 characters - # or less. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_location_mute_config(parent, google_cloud_securitycenter_v1_mute_config_object = nil, mute_config_id: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+parent}/muteConfigs', options) - command.request_representation = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig::Representation - command.request_object = google_cloud_securitycenter_v1_mute_config_object - command.response_representation = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig::Representation - command.response_class = Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1MuteConfig - command.params['parent'] = parent unless parent.nil? - command.query['muteConfigId'] = mute_config_id unless mute_config_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Deletes an existing mute config. # @param [String] name # Required. Name of the mute config to delete. Its format is `organizations/` @@ -6249,48 +6042,6 @@ def get_project_location_mute_config(name, fields: nil, quota_user: nil, options execute_or_queue_command(command, &block) end - # Lists mute configs. - # @param [String] parent - # Required. The parent, which owns the collection of mute configs. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[ - # project_id]`. - # @param [Fixnum] page_size - # The maximum number of configs to return. The service may return fewer than - # this value. If unspecified, at most 10 configs will be returned. The maximum - # value is 1000; values above 1000 will be coerced to 1000. - # @param [String] page_token - # A page token, received from a previous `ListMuteConfigs` call. Provide this to - # retrieve the subsequent page. When paginating, all other parameters provided - # to `ListMuteConfigs` must match the call that provided the page token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SecuritycenterV1::ListMuteConfigsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SecuritycenterV1::ListMuteConfigsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_location_mute_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+parent}', options) - command.response_representation = Google::Apis::SecuritycenterV1::ListMuteConfigsResponse::Representation - command.response_class = Google::Apis::SecuritycenterV1::ListMuteConfigsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Updates a mute config. # @param [String] name # This field will be ignored if provided on config creation. Format `