lib/google/apis/dlp_v2/service.rb in google-apis-dlp_v2-0.61.0 vs lib/google/apis/dlp_v2/service.rb in google-apis-dlp_v2-0.62.0

- old
+ new

@@ -657,10 +657,51 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Searches for Connections in a parent. + # @param [String] parent + # Required. Parent name, typically an organization, without location. For + # example: "organizations/12345678". + # @param [String] filter + # Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR + # @param [Fixnum] page_size + # Optional. Number of results per page, max 1000. + # @param [String] page_token + # Optional. Page token from a previous page to return the next set of results. + # If set, all other request fields must match the original request. + # @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::GooglePrivacyDlpV2SearchConnectionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2SearchConnectionsResponse] + # + # @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 search_organization_location_connections(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/connections:search', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2SearchConnectionsResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2SearchConnectionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.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 + # Creates a DeidentifyTemplate for reusing frequently used configuration for de- # identifying content, images, and storage. See https://cloud.google.com/ # sensitive-data-protection/docs/creating-templates-deid to learn more. # @param [String] parent # Required. Parent resource name. The format of this value varies depending on @@ -1856,10 +1897,41 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Delete a TableDataProfile. Will not prevent the profile from being regenerated + # if the table is still included in a discovery configuration. + # @param [String] name + # Required. Resource name of the table data profile. + # @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_table_data_profile(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 table data profile. # @param [String] name # Required. Resource name, for example `organizations/12345/locations/us/ # tableDataProfiles/53234423`. # @param [String] fields @@ -3342,10 +3414,221 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Create a Connection to an external data source. + # @param [String] parent + # Required. Parent resource name in the format: "projects/`project`/locations/` + # location`". + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2CreateConnectionRequest] google_privacy_dlp_v2_create_connection_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::GooglePrivacyDlpV2Connection] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2Connection] + # + # @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_connection(parent, google_privacy_dlp_v2_create_connection_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/connections', options) + command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2CreateConnectionRequest::Representation + command.request_object = google_privacy_dlp_v2_create_connection_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2Connection::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2Connection + 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 + + # Delete a Connection. + # @param [String] name + # Required. Resource name of the Connection to be deleted, in the format: " + # projects/`project`/locations/`location`/connections/`connection`". + # @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_project_location_connection(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 + + # Get a Connection by name. + # @param [String] name + # Required. Resource name in the format: "projects/`project`/locations/`location` + # /connections/`connection`". + # @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::GooglePrivacyDlpV2Connection] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2Connection] + # + # @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_project_location_connection(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+name}', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2Connection::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2Connection + 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 Connections in a parent. + # @param [String] parent + # Required. Parent name, for example: "projects/project-id/locations/global". + # @param [String] filter + # Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR + # @param [Fixnum] page_size + # Optional. Number of results per page, max 1000. + # @param [String] page_token + # Optional. Page token from a previous page to return the next set of results. + # If set, all other request fields must match the original request. + # @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::GooglePrivacyDlpV2ListConnectionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2ListConnectionsResponse] + # + # @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_connections(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/connections', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2ListConnectionsResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2ListConnectionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.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 + + # Update a Connection. + # @param [String] name + # Required. Resource name in the format: "projects/`project`/locations/`location` + # /connections/`connection`". + # @param [Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateConnectionRequest] google_privacy_dlp_v2_update_connection_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::GooglePrivacyDlpV2Connection] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2Connection] + # + # @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_project_location_connection(name, google_privacy_dlp_v2_update_connection_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::GooglePrivacyDlpV2UpdateConnectionRequest::Representation + command.request_object = google_privacy_dlp_v2_update_connection_request_object + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2Connection::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2Connection + 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 + + # Searches for Connections in a parent. + # @param [String] parent + # Required. Parent name, typically an organization, without location. For + # example: "organizations/12345678". + # @param [String] filter + # Optional. * Supported fields/values - `state` - MISSING|AVAILABLE|ERROR + # @param [Fixnum] page_size + # Optional. Number of results per page, max 1000. + # @param [String] page_token + # Optional. Page token from a previous page to return the next set of results. + # If set, all other request fields must match the original request. + # @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::GooglePrivacyDlpV2SearchConnectionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DlpV2::GooglePrivacyDlpV2SearchConnectionsResponse] + # + # @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 search_project_location_connections(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/connections:search', options) + command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2SearchConnectionsResponse::Representation + command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2SearchConnectionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.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 + # De-identifies potentially sensitive info from a ContentItem. This method has # limits on input size and output size. See https://cloud.google.com/sensitive- # data-protection/docs/deidentify-sensitive-data to learn more. When no # InfoTypes or CustomInfoTypes are specified in this request, the system will # automatically choose what detectors to run. By default this may be all types, @@ -5001,9 +5284,40 @@ command = make_simple_command(:patch, 'v2/{+name}', options) command.request_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2UpdateStoredInfoTypeRequest::Representation command.request_object = google_privacy_dlp_v2_update_stored_info_type_request_object command.response_representation = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType::Representation command.response_class = Google::Apis::DlpV2::GooglePrivacyDlpV2StoredInfoType + 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 + + # Delete a TableDataProfile. Will not prevent the profile from being regenerated + # if the table is still included in a discovery configuration. + # @param [String] name + # Required. Resource name of the table data profile. + # @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_project_location_table_data_profile(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