google-cloud-security_center-v1 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +1 -1
  4. data/lib/google/cloud/security_center/v1.rb +1 -1
  5. data/lib/google/cloud/security_center/v1/security_center.rb +1 -1
  6. data/lib/google/cloud/security_center/v1/security_center/client.rb +458 -458
  7. data/lib/google/cloud/security_center/v1/security_center/credentials.rb +1 -1
  8. data/lib/google/cloud/security_center/v1/security_center/operations.rb +100 -100
  9. data/lib/google/cloud/security_center/v1/security_center/paths.rb +16 -16
  10. data/lib/google/cloud/security_center/v1/version.rb +1 -1
  11. data/proto_docs/google/api/resource.rb +12 -12
  12. data/proto_docs/google/cloud/securitycenter/v1/asset.rb +26 -26
  13. data/proto_docs/google/cloud/securitycenter/v1/finding.rb +16 -16
  14. data/proto_docs/google/cloud/securitycenter/v1/notification_config.rb +10 -10
  15. data/proto_docs/google/cloud/securitycenter/v1/notification_message.rb +4 -4
  16. data/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb +9 -9
  17. data/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb +4 -4
  18. data/proto_docs/google/cloud/securitycenter/v1/security_marks.rb +8 -8
  19. data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +159 -159
  20. data/proto_docs/google/cloud/securitycenter/v1/source.rb +5 -5
  21. data/proto_docs/google/iam/v1/iam_policy.rb +15 -15
  22. data/proto_docs/google/iam/v1/options.rb +3 -3
  23. data/proto_docs/google/iam/v1/policy.rb +26 -26
  24. data/proto_docs/google/longrunning/operations.rb +30 -30
  25. data/proto_docs/google/protobuf/any.rb +4 -4
  26. data/proto_docs/google/protobuf/duration.rb +4 -4
  27. data/proto_docs/google/protobuf/empty.rb +2 -2
  28. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  29. data/proto_docs/google/protobuf/struct.rb +18 -18
  30. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  31. data/proto_docs/google/rpc/status.rb +6 -6
  32. data/proto_docs/google/type/expr.rb +6 -6
  33. metadata +2 -2
@@ -35,10 +35,10 @@ module Google
35
35
  # @param source [String]
36
36
  # @param finding [String]
37
37
  #
38
- # @return [String]
38
+ # @return [::String]
39
39
  def finding_path organization:, source:, finding:
40
- raise ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
41
- raise ArgumentError, "source cannot contain /" if source.to_s.include? "/"
40
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
41
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
42
42
 
43
43
  "organizations/#{organization}/sources/#{source}/findings/#{finding}"
44
44
  end
@@ -53,9 +53,9 @@ module Google
53
53
  # @param organization [String]
54
54
  # @param notification_config [String]
55
55
  #
56
- # @return [String]
56
+ # @return [::String]
57
57
  def notification_config_path organization:, notification_config:
58
- raise ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
58
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
59
59
 
60
60
  "organizations/#{organization}/notificationConfigs/#{notification_config}"
61
61
  end
@@ -69,7 +69,7 @@ module Google
69
69
  #
70
70
  # @param organization [String]
71
71
  #
72
- # @return [String]
72
+ # @return [::String]
73
73
  def organization_path organization:
74
74
  "organizations/#{organization}"
75
75
  end
@@ -83,7 +83,7 @@ module Google
83
83
  #
84
84
  # @param organization [String]
85
85
  #
86
- # @return [String]
86
+ # @return [::String]
87
87
  def organization_settings_path organization:
88
88
  "organizations/#{organization}/organizationSettings"
89
89
  end
@@ -108,24 +108,24 @@ module Google
108
108
  # @param source [String]
109
109
  # @param finding [String]
110
110
  #
111
- # @return [String]
111
+ # @return [::String]
112
112
  def security_marks_path **args
113
113
  resources = {
114
114
  "asset:organization" => (proc do |organization:, asset:|
115
- raise ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
115
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
116
116
 
117
117
  "organizations/#{organization}/assets/#{asset}/securityMarks"
118
118
  end),
119
119
  "finding:organization:source" => (proc do |organization:, source:, finding:|
120
- raise ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
121
- raise ArgumentError, "source cannot contain /" if source.to_s.include? "/"
120
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
121
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
122
122
 
123
123
  "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks"
124
124
  end)
125
125
  }
126
126
 
127
127
  resource = resources[args.keys.sort.join(":")]
128
- raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
128
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
129
129
  resource.call(**args)
130
130
  end
131
131
 
@@ -139,9 +139,9 @@ module Google
139
139
  # @param organization [String]
140
140
  # @param source [String]
141
141
  #
142
- # @return [String]
142
+ # @return [::String]
143
143
  def source_path organization:, source:
144
- raise ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
144
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
145
145
 
146
146
  "organizations/#{organization}/sources/#{source}"
147
147
  end
@@ -156,9 +156,9 @@ module Google
156
156
  # @param project [String]
157
157
  # @param topic [String]
158
158
  #
159
- # @return [String]
159
+ # @return [::String]
160
160
  def topic_path project:, topic:
161
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
161
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
162
162
 
163
163
  "projects/#{project}/topics/#{topic}"
164
164
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module SecurityCenter
23
23
  module V1
24
- VERSION = "0.1.0"
24
+ VERSION = "0.1.1"
25
25
  end
26
26
  end
27
27
  end
@@ -128,7 +128,7 @@ module Google
128
128
  # - pattern: "shelves/{shelf}"
129
129
  # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
130
  # @!attribute [rw] type
131
- # @return [String]
131
+ # @return [::String]
132
132
  # The resource type. It must be in the format of
133
133
  # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
134
  # singular and must not include version numbers.
@@ -140,7 +140,7 @@ module Google
140
140
  # should use PascalCase (UpperCamelCase). The maximum number of
141
141
  # characters allowed for the `resource_type_kind` is 100.
142
142
  # @!attribute [rw] pattern
143
- # @return [Array<String>]
143
+ # @return [::Array<::String>]
144
144
  # Optional. The relative resource name pattern associated with this resource
145
145
  # type. The DNS prefix of the full resource name shouldn't be specified here.
146
146
  #
@@ -161,11 +161,11 @@ module Google
161
161
  # the same component name (e.g. "project") refers to IDs of the same
162
162
  # type of resource.
163
163
  # @!attribute [rw] name_field
164
- # @return [String]
164
+ # @return [::String]
165
165
  # Optional. The field on the resource that designates the resource name
166
166
  # field. If omitted, this is assumed to be "name".
167
167
  # @!attribute [rw] history
168
- # @return [Google::Api::ResourceDescriptor::History]
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
169
  # Optional. The historical or future-looking state of the resource pattern.
170
170
  #
171
171
  # Example:
@@ -182,19 +182,19 @@ module Google
182
182
  # };
183
183
  # }
184
184
  # @!attribute [rw] plural
185
- # @return [String]
185
+ # @return [::String]
186
186
  # The plural name used in the resource name, such as 'projects' for
187
187
  # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
188
  # field in k8s CRD spec
189
189
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
190
  # @!attribute [rw] singular
191
- # @return [String]
191
+ # @return [::String]
192
192
  # The same concept of the `singular` field in k8s CRD spec
193
193
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
194
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
195
  class ResourceDescriptor
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
198
 
199
199
  # A description of the historical or future-looking state of the
200
200
  # resource pattern.
@@ -216,7 +216,7 @@ module Google
216
216
  # Defines a proto annotation that describes a string field that refers to
217
217
  # an API resource.
218
218
  # @!attribute [rw] type
219
- # @return [String]
219
+ # @return [::String]
220
220
  # The resource type that the annotated field references.
221
221
  #
222
222
  # Example:
@@ -227,7 +227,7 @@ module Google
227
227
  # }];
228
228
  # }
229
229
  # @!attribute [rw] child_type
230
- # @return [String]
230
+ # @return [::String]
231
231
  # The resource type of a child collection that the annotated field
232
232
  # references. This is useful for annotating the `parent` field that
233
233
  # doesn't have a fixed resource type.
@@ -240,8 +240,8 @@ module Google
240
240
  # };
241
241
  # }
242
242
  class ResourceReference
243
- include Google::Protobuf::MessageExts
244
- extend Google::Protobuf::MessageExts::ClassMethods
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
  end
247
247
  end
@@ -28,97 +28,97 @@ module Google
28
28
  # GCP resource. All modifications to an Asset are only within the context of
29
29
  # Cloud SCC and don't affect the referenced GCP resource.
30
30
  # @!attribute [rw] name
31
- # @return [String]
31
+ # @return [::String]
32
32
  # The relative resource name of this asset. See:
33
33
  # https://cloud.google.com/apis/design/resource_names#relative_resource_name
34
34
  # Example:
35
35
  # "organizations/\\{organization_id}/assets/\\{asset_id}".
36
36
  # @!attribute [rw] security_center_properties
37
- # @return [Google::Cloud::SecurityCenter::V1::Asset::SecurityCenterProperties]
37
+ # @return [::Google::Cloud::SecurityCenter::V1::Asset::SecurityCenterProperties]
38
38
  # Cloud SCC managed properties. These properties are managed by
39
39
  # Cloud SCC and cannot be modified by the user.
40
40
  # @!attribute [rw] resource_properties
41
- # @return [Google::Protobuf::Map{String => Google::Protobuf::Value}]
41
+ # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
42
42
  # Resource managed properties. These properties are managed and defined by
43
43
  # the GCP resource and cannot be modified by the user.
44
44
  # @!attribute [rw] security_marks
45
- # @return [Google::Cloud::SecurityCenter::V1::SecurityMarks]
45
+ # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
46
46
  # User specified security marks. These marks are entirely managed by the user
47
47
  # and come from the SecurityMarks resource that belongs to the asset.
48
48
  # @!attribute [rw] create_time
49
- # @return [Google::Protobuf::Timestamp]
49
+ # @return [::Google::Protobuf::Timestamp]
50
50
  # The time at which the asset was created in Cloud SCC.
51
51
  # @!attribute [rw] update_time
52
- # @return [Google::Protobuf::Timestamp]
52
+ # @return [::Google::Protobuf::Timestamp]
53
53
  # The time at which the asset was last updated, added, or deleted in Cloud
54
54
  # SCC.
55
55
  # @!attribute [rw] iam_policy
56
- # @return [Google::Cloud::SecurityCenter::V1::Asset::IamPolicy]
56
+ # @return [::Google::Cloud::SecurityCenter::V1::Asset::IamPolicy]
57
57
  # IAM Policy information associated with the GCP resource described by the
58
58
  # Cloud SCC asset. This information is managed and defined by the GCP
59
59
  # resource and cannot be modified by the user.
60
60
  class Asset
61
- include Google::Protobuf::MessageExts
62
- extend Google::Protobuf::MessageExts::ClassMethods
61
+ include ::Google::Protobuf::MessageExts
62
+ extend ::Google::Protobuf::MessageExts::ClassMethods
63
63
 
64
64
  # Cloud SCC managed properties. These properties are managed by Cloud SCC and
65
65
  # cannot be modified by the user.
66
66
  # @!attribute [rw] resource_name
67
- # @return [String]
67
+ # @return [::String]
68
68
  # The full resource name of the GCP resource this asset
69
69
  # represents. This field is immutable after create time. See:
70
70
  # https://cloud.google.com/apis/design/resource_names#full_resource_name
71
71
  # @!attribute [rw] resource_type
72
- # @return [String]
72
+ # @return [::String]
73
73
  # The type of the GCP resource. Examples include: APPLICATION,
74
74
  # PROJECT, and ORGANIZATION. This is a case insensitive field defined by
75
75
  # Cloud SCC and/or the producer of the resource and is immutable
76
76
  # after create time.
77
77
  # @!attribute [rw] resource_parent
78
- # @return [String]
78
+ # @return [::String]
79
79
  # The full resource name of the immediate parent of the resource. See:
80
80
  # https://cloud.google.com/apis/design/resource_names#full_resource_name
81
81
  # @!attribute [rw] resource_project
82
- # @return [String]
82
+ # @return [::String]
83
83
  # The full resource name of the project the resource belongs to. See:
84
84
  # https://cloud.google.com/apis/design/resource_names#full_resource_name
85
85
  # @!attribute [rw] resource_owners
86
- # @return [Array<String>]
86
+ # @return [::Array<::String>]
87
87
  # Owners of the Google Cloud resource.
88
88
  # @!attribute [rw] resource_display_name
89
- # @return [String]
89
+ # @return [::String]
90
90
  # The user defined display name for this resource.
91
91
  # @!attribute [rw] resource_parent_display_name
92
- # @return [String]
92
+ # @return [::String]
93
93
  # The user defined display name for the parent of this resource.
94
94
  # @!attribute [rw] resource_project_display_name
95
- # @return [String]
95
+ # @return [::String]
96
96
  # The user defined display name for the project of this resource.
97
97
  class SecurityCenterProperties
98
- include Google::Protobuf::MessageExts
99
- extend Google::Protobuf::MessageExts::ClassMethods
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
100
  end
101
101
 
102
102
  # IAM Policy information associated with the GCP resource described by the
103
103
  # Cloud SCC asset. This information is managed and defined by the GCP
104
104
  # resource and cannot be modified by the user.
105
105
  # @!attribute [rw] policy_blob
106
- # @return [String]
106
+ # @return [::String]
107
107
  # The JSON representation of the Policy associated with the asset.
108
108
  # See https://cloud.google.com/iam/reference/rest/v1/Policy for format
109
109
  # details.
110
110
  class IamPolicy
111
- include Google::Protobuf::MessageExts
112
- extend Google::Protobuf::MessageExts::ClassMethods
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
113
  end
114
114
 
115
115
  # @!attribute [rw] key
116
- # @return [String]
116
+ # @return [::String]
117
117
  # @!attribute [rw] value
118
- # @return [Google::Protobuf::Value]
118
+ # @return [::Google::Protobuf::Value]
119
119
  class ResourcePropertiesEntry
120
- include Google::Protobuf::MessageExts
121
- extend Google::Protobuf::MessageExts::ClassMethods
120
+ include ::Google::Protobuf::MessageExts
121
+ extend ::Google::Protobuf::MessageExts::ClassMethods
122
122
  end
123
123
  end
124
124
  end
@@ -29,20 +29,20 @@ module Google
29
29
  # cross-site scripting (XSS) vulnerability in an App Engine application is a
30
30
  # finding.
31
31
  # @!attribute [rw] name
32
- # @return [String]
32
+ # @return [::String]
33
33
  # The relative resource name of this finding. See:
34
34
  # https://cloud.google.com/apis/design/resource_names#relative_resource_name
35
35
  # Example:
36
36
  # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}"
37
37
  # @!attribute [rw] parent
38
- # @return [String]
38
+ # @return [::String]
39
39
  # The relative resource name of the source the finding belongs to. See:
40
40
  # https://cloud.google.com/apis/design/resource_names#relative_resource_name
41
41
  # This field is immutable after creation time.
42
42
  # For example:
43
43
  # "organizations/\\{organization_id}/sources/\\{source_id}"
44
44
  # @!attribute [rw] resource_name
45
- # @return [String]
45
+ # @return [::String]
46
46
  # For findings on Google Cloud Platform (GCP) resources, the full resource
47
47
  # name of the GCP resource this finding is for. See:
48
48
  # https://cloud.google.com/apis/design/resource_names#full_resource_name
@@ -50,48 +50,48 @@ module Google
50
50
  # customer or partner defined string.
51
51
  # This field is immutable after creation time.
52
52
  # @!attribute [rw] state
53
- # @return [Google::Cloud::SecurityCenter::V1::Finding::State]
53
+ # @return [::Google::Cloud::SecurityCenter::V1::Finding::State]
54
54
  # The state of the finding.
55
55
  # @!attribute [rw] category
56
- # @return [String]
56
+ # @return [::String]
57
57
  # The additional taxonomy group within findings from a given source.
58
58
  # This field is immutable after creation time.
59
59
  # Example: "XSS_FLASH_INJECTION"
60
60
  # @!attribute [rw] external_uri
61
- # @return [String]
61
+ # @return [::String]
62
62
  # The URI that, if available, points to a web page outside of Cloud SCC
63
63
  # where additional information about the finding can be found. This field is
64
64
  # guaranteed to be either empty or a well formed URL.
65
65
  # @!attribute [rw] source_properties
66
- # @return [Google::Protobuf::Map{String => Google::Protobuf::Value}]
66
+ # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
67
67
  # Source specific properties. These properties are managed by the source
68
68
  # that writes the finding. The key names in the source_properties map must be
69
69
  # between 1 and 255 characters, and must start with a letter and contain
70
70
  # alphanumeric characters or underscores only.
71
71
  # @!attribute [r] security_marks
72
- # @return [Google::Cloud::SecurityCenter::V1::SecurityMarks]
72
+ # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks]
73
73
  # Output only. User specified security marks. These marks are entirely
74
74
  # managed by the user and come from the SecurityMarks resource that belongs
75
75
  # to the finding.
76
76
  # @!attribute [rw] event_time
77
- # @return [Google::Protobuf::Timestamp]
77
+ # @return [::Google::Protobuf::Timestamp]
78
78
  # The time at which the event took place. For example, if the finding
79
79
  # represents an open firewall it would capture the time the detector believes
80
80
  # the firewall became open. The accuracy is determined by the detector.
81
81
  # @!attribute [rw] create_time
82
- # @return [Google::Protobuf::Timestamp]
82
+ # @return [::Google::Protobuf::Timestamp]
83
83
  # The time at which the finding was created in Cloud SCC.
84
84
  class Finding
85
- include Google::Protobuf::MessageExts
86
- extend Google::Protobuf::MessageExts::ClassMethods
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
87
 
88
88
  # @!attribute [rw] key
89
- # @return [String]
89
+ # @return [::String]
90
90
  # @!attribute [rw] value
91
- # @return [Google::Protobuf::Value]
91
+ # @return [::Google::Protobuf::Value]
92
92
  class SourcePropertiesEntry
93
- include Google::Protobuf::MessageExts
94
- extend Google::Protobuf::MessageExts::ClassMethods
93
+ include ::Google::Protobuf::MessageExts
94
+ extend ::Google::Protobuf::MessageExts::ClassMethods
95
95
  end
96
96
 
97
97
  # The state of the finding.
@@ -26,33 +26,33 @@ module Google
26
26
  # A notification config is a Cloud SCC resource that contains the configuration
27
27
  # to send notifications for create/update events of findings, assets and etc.
28
28
  # @!attribute [rw] name
29
- # @return [String]
29
+ # @return [::String]
30
30
  # The relative resource name of this notification config. See:
31
31
  # https://cloud.google.com/apis/design/resource_names#relative_resource_name
32
32
  # Example:
33
33
  # "organizations/\\{organization_id}/notificationConfigs/notify_public_bucket".
34
34
  # @!attribute [rw] description
35
- # @return [String]
35
+ # @return [::String]
36
36
  # The description of the notification config (max of 1024 characters).
37
37
  # @!attribute [rw] pubsub_topic
38
- # @return [String]
38
+ # @return [::String]
39
39
  # The PubSub topic to send notifications to. Its format is
40
40
  # "projects/[project_id]/topics/[topic]".
41
41
  # @!attribute [r] service_account
42
- # @return [String]
42
+ # @return [::String]
43
43
  # Output only. The service account that needs "pubsub.topics.publish"
44
44
  # permission to publish to the PubSub topic.
45
45
  # @!attribute [rw] streaming_config
46
- # @return [Google::Cloud::SecurityCenter::V1::NotificationConfig::StreamingConfig]
46
+ # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig::StreamingConfig]
47
47
  # The config for triggering streaming-based notifications.
48
48
  class NotificationConfig
49
- include Google::Protobuf::MessageExts
50
- extend Google::Protobuf::MessageExts::ClassMethods
49
+ include ::Google::Protobuf::MessageExts
50
+ extend ::Google::Protobuf::MessageExts::ClassMethods
51
51
 
52
52
  # The config for streaming-based notifications, which send each event as soon
53
53
  # as it is detected.
54
54
  # @!attribute [rw] filter
55
- # @return [String]
55
+ # @return [::String]
56
56
  # Expression that defines the filter to apply across create/update events
57
57
  # of assets or findings as specified by the event type. The expression is a
58
58
  # list of zero or more restrictions combined via logical operators `AND`
@@ -75,8 +75,8 @@ module Google
75
75
  # * integer literals without quotes.
76
76
  # * boolean literals `true` and `false` without quotes.
77
77
  class StreamingConfig
78
- include Google::Protobuf::MessageExts
79
- extend Google::Protobuf::MessageExts::ClassMethods
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
80
  end
81
81
  end
82
82
  end