diff --git a/api_names_out.yaml b/api_names_out.yaml index e6806a872..fadb06b17 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -95918,6 +95918,14 @@ "/dlp:v2/dlp.organizations.locations.deidentifyTemplates.list/parent": parent "/dlp:v2/dlp.organizations.locations.deidentifyTemplates.patch": patch_organization_location_deidentify_template "/dlp:v2/dlp.organizations.locations.deidentifyTemplates.patch/name": name +"/dlp:v2/dlp.organizations.locations.dlpJobs.list": list_organization_location_dlp_jobs +"/dlp:v2/dlp.organizations.locations.dlpJobs.list/filter": filter +"/dlp:v2/dlp.organizations.locations.dlpJobs.list/locationId": location_id +"/dlp:v2/dlp.organizations.locations.dlpJobs.list/orderBy": order_by +"/dlp:v2/dlp.organizations.locations.dlpJobs.list/pageSize": page_size +"/dlp:v2/dlp.organizations.locations.dlpJobs.list/pageToken": page_token +"/dlp:v2/dlp.organizations.locations.dlpJobs.list/parent": parent +"/dlp:v2/dlp.organizations.locations.dlpJobs.list/type": type "/dlp:v2/dlp.organizations.locations.inspectTemplates.create": create_organization_location_inspect_template "/dlp:v2/dlp.organizations.locations.inspectTemplates.create/parent": parent "/dlp:v2/dlp.organizations.locations.inspectTemplates.delete": delete_organization_location_inspect_template @@ -95932,6 +95940,21 @@ "/dlp:v2/dlp.organizations.locations.inspectTemplates.list/parent": parent "/dlp:v2/dlp.organizations.locations.inspectTemplates.patch": patch_organization_location_inspect_template "/dlp:v2/dlp.organizations.locations.inspectTemplates.patch/name": name +"/dlp:v2/dlp.organizations.locations.jobTriggers.create": create_organization_location_job_trigger +"/dlp:v2/dlp.organizations.locations.jobTriggers.create/parent": parent +"/dlp:v2/dlp.organizations.locations.jobTriggers.delete": delete_organization_location_job_trigger +"/dlp:v2/dlp.organizations.locations.jobTriggers.delete/name": name +"/dlp:v2/dlp.organizations.locations.jobTriggers.get": get_organization_location_job_trigger +"/dlp:v2/dlp.organizations.locations.jobTriggers.get/name": name +"/dlp:v2/dlp.organizations.locations.jobTriggers.list": list_organization_location_job_triggers +"/dlp:v2/dlp.organizations.locations.jobTriggers.list/filter": filter +"/dlp:v2/dlp.organizations.locations.jobTriggers.list/locationId": location_id +"/dlp:v2/dlp.organizations.locations.jobTriggers.list/orderBy": order_by +"/dlp:v2/dlp.organizations.locations.jobTriggers.list/pageSize": page_size +"/dlp:v2/dlp.organizations.locations.jobTriggers.list/pageToken": page_token +"/dlp:v2/dlp.organizations.locations.jobTriggers.list/parent": parent +"/dlp:v2/dlp.organizations.locations.jobTriggers.patch": patch_organization_location_job_trigger +"/dlp:v2/dlp.organizations.locations.jobTriggers.patch/name": name "/dlp:v2/dlp.organizations.locations.storedInfoTypes.create": create_organization_location_stored_info_type "/dlp:v2/dlp.organizations.locations.storedInfoTypes.create/parent": parent "/dlp:v2/dlp.organizations.locations.storedInfoTypes.delete": delete_organization_location_stored_info_type diff --git a/generated/google/apis/dlp_v2.rb b/generated/google/apis/dlp_v2.rb index 622a55b6b..18e8170b7 100644 --- a/generated/google/apis/dlp_v2.rb +++ b/generated/google/apis/dlp_v2.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/dlp/docs/ module DlpV2 VERSION = 'V2' - REVISION = '20201107' + REVISION = '20201207' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dlp_v2/service.rb b/generated/google/apis/dlp_v2/service.rb index e77c6cd27..4f247474d 100644 --- a/generated/google/apis/dlp_v2/service.rb +++ b/generated/google/apis/dlp_v2/service.rb @@ -759,6 +759,83 @@ module Google execute_or_queue_command(command, &block) end + # Lists DlpJobs that match the specified filter in the request. See https:// + # cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/ + # docs/compute-risk-analysis to learn more. + # @param [String] parent + # Required. Parent resource name. The format of this value varies depending on + # whether you have [specified a processing location](https://cloud.google.com/ + # dlp/docs/specifying-location): + Projects scope, location specified: `projects/ + # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified ( + # defaults to global): `projects/`PROJECT_ID The following example `parent` + # string specifies a parent project with the identifier `example-project`, and + # specifies the `europe-west3` location for processing data: parent=projects/ + # example-project/locations/europe-west3 + # @param [String] filter + # Allows filtering. Supported syntax: * Filter expressions are made up of one or + # more restrictions. * Restrictions can be combined by `AND` or `OR` logical + # operators. A sequence of restrictions implicitly uses `AND`. * A restriction + # has the form of ``field` `operator` `value``. * Supported fields/values for + # inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - ` + # inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The + # resource name of the trigger that created job. - 'end_time` - Corresponds to + # time the job finished. - 'start_time` - Corresponds to time the job finished. * + # Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED| + # FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - ' + # start_time` - Corresponds to time the job finished. * The operator must be `=` + # or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * + # inspected_storage = cloud_storage OR inspected_storage = bigquery * + # inspected_storage = cloud_storage AND (state = done OR state = canceled) * + # end_time > \"2017-12-12T00:00:00+00:00\" The length of this field should be no + # more than 500 characters. + # @param [String] location_id + # Deprecated. This field has no effect. + # @param [String] order_by + # Comma separated list of fields to order by, followed by `asc` or `desc` + # postfix. This list is case-insensitive, default sorting order is ascending, + # redundant space characters are insignificant. Example: `name asc, end_time asc, + # create_time desc` Supported fields are: - `create_time`: corresponds to time + # the job was created. - `end_time`: corresponds to time the job ended. - `name`: + # corresponds to job's name. - `state`: corresponds to `state` + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] type + # The type of job. Defaults to `DlpJobType.INSPECT` + # @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::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse] + # + # @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_dlp_jobs(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/dlpJobs', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListDlpJobsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['type'] = type unless type.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates an InspectTemplate for re-using frequently used configuration for # inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/ # creating-templates to learn more. @@ -967,6 +1044,222 @@ module Google execute_or_queue_command(command, &block) end + # Creates a job trigger to run DLP actions such as scanning storage for + # sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/ + # creating-job-triggers to learn more. + # @param [String] parent + # Required. Parent resource name. The format of this value varies depending on + # whether you have [specified a processing location](https://cloud.google.com/ + # dlp/docs/specifying-location): + Projects scope, location specified: `projects/ + # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified ( + # defaults to global): `projects/`PROJECT_ID The following example `parent` + # string specifies a parent project with the identifier `example-project`, and + # specifies the `europe-west3` location for processing data: parent=projects/ + # example-project/locations/europe-west3 + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest] google_privacy_dlp_v2_create_job_trigger_request_object + # @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::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] + # + # @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_job_trigger(parent, google_privacy_dlp_v2_create_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/jobTriggers', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateJobTriggerRequest::Representation + command.request_object = google_privacy_dlp_v2_create_job_trigger_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger + command.params['parent'] = parent unless parent.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 a job trigger. See https://cloud.google.com/dlp/docs/creating-job- + # triggers to learn more. + # @param [String] name + # Required. Resource name of the project and the triggeredJob, for example ` + # projects/dlp-test-project/jobTriggers/53234423`. + # @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::DlpV2::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GoogleProtobufEmpty] + # + # @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 delete_organization_location_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DlpV2::GoogleProtobufEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job- + # triggers to learn more. + # @param [String] name + # Required. Resource name of the project and the triggeredJob, for example ` + # projects/dlp-test-project/jobTriggers/53234423`. + # @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::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] + # + # @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 get_organization_location_job_trigger(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job- + # triggers to learn more. + # @param [String] parent + # Required. Parent resource name. The format of this value varies depending on + # whether you have [specified a processing location](https://cloud.google.com/ + # dlp/docs/specifying-location): + Projects scope, location specified: `projects/ + # `PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified ( + # defaults to global): `projects/`PROJECT_ID The following example `parent` + # string specifies a parent project with the identifier `example-project`, and + # specifies the `europe-west3` location for processing data: parent=projects/ + # example-project/locations/europe-west3 + # @param [String] filter + # Allows filtering. Supported syntax: * Filter expressions are made up of one or + # more restrictions. * Restrictions can be combined by `AND` or `OR` logical + # operators. A sequence of restrictions implicitly uses `AND`. * A restriction + # has the form of ``field` `operator` `value``. * Supported fields/values for + # inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - + # DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted + # timestamp, surrounded by quotation marks. Nanoseconds are ignored. - ' + # error_count' - Number of errors that have occurred while running. * The + # operator must be `=` or `!=` for status and inspected_storage. Examples: * + # inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = + # cloud_storage OR inspected_storage = bigquery * inspected_storage = + # cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time > \"2017- + # 12-12T00:00:00+00:00\" The length of this field should be no more than 500 + # characters. + # @param [String] location_id + # Deprecated. This field has no effect. + # @param [String] order_by + # Comma separated list of triggeredJob fields to order by, followed by `asc` or ` + # desc` postfix. This list is case-insensitive, default sorting order is + # ascending, redundant space characters are insignificant. Example: `name asc, + # update_time, create_time desc` Supported fields are: - `create_time`: + # corresponds to time the JobTrigger was created. - `update_time`: corresponds + # to time the JobTrigger was last updated. - `last_run_time`: corresponds to the + # last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - ` + # display_name`: corresponds to JobTrigger's display name. - `status`: + # corresponds to JobTrigger's status. + # @param [Fixnum] page_size + # Size of the page, can be limited by a server. + # @param [String] page_token + # Page token to continue retrieval. Comes from previous call to ListJobTriggers. + # `order_by` field must not change for subsequent calls. + # @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::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse] + # + # @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_job_triggers(parent, filter: nil, location_id: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/jobTriggers', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListJobTriggersResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['locationId'] = location_id unless location_id.nil? + command.query['orderBy'] = order_by unless order_by.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 job trigger. See https://cloud.google.com/dlp/docs/creating-job- + # triggers to learn more. + # @param [String] name + # Required. Resource name of the project and the triggeredJob, for example ` + # projects/dlp-test-project/jobTriggers/53234423`. + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest] google_privacy_dlp_v2_update_job_trigger_request_object + # @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::DlpV2::GooglePrivacyDlpV2JobTrigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger] + # + # @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 patch_organization_location_job_trigger(name, google_privacy_dlp_v2_update_job_trigger_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/{+name}', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateJobTriggerRequest::Representation + command.request_object = google_privacy_dlp_v2_update_job_trigger_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2JobTrigger + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a pre-built stored infoType to be used for inspection. See https:// # cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. # @param [String] parent @@ -2972,7 +3265,7 @@ module Google execute_or_queue_command(command, &block) end - # Inspect hybrid content and store findings to a job. To review the findings + # Inspect hybrid content and store findings to a job. To review the findings, # inspect the job. Inspection will occur asynchronously. Early access feature is # in a pre-release state and might change or have limited support. For more # information, see https://cloud.google.com/products#product-launch-stages. diff --git a/generated/google/apis/dlp_v2/synth.metadata b/generated/google/apis/dlp_v2/synth.metadata index 7f5122644..63e245f02 100644 --- a/generated/google/apis/dlp_v2/synth.metadata +++ b/generated/google/apis/dlp_v2/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "e317a0f5e6109142be13031fa9e9baee4d2f897e" + "sha": "7ae5b922647c1fb6221d2b6838b88ab5e55c06bc" } } ]