Class: Google::Apis::SecuritycenterV1::SimulatedResource
- Inherits:
-
Object
- Object
- Google::Apis::SecuritycenterV1::SimulatedResource
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/securitycenter_v1/classes.rb,
lib/google/apis/securitycenter_v1/representations.rb,
lib/google/apis/securitycenter_v1/representations.rb
Overview
Manually constructed resource name. If the custom module evaluates against
only the resource data, you can omit the iam_policy_data
field. If it
evaluates only the iam_policy_data
field, you can omit the resource data.
Instance Attribute Summary collapse
-
#iam_policy_data ⇒ Google::Apis::SecuritycenterV1::Policy
An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
-
#resource_data ⇒ Hash<String,Object>
Optional.
-
#resource_type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SimulatedResource
constructor
A new instance of SimulatedResource.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SimulatedResource
Returns a new instance of SimulatedResource.
10332 10333 10334 |
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10332 def initialize(**args) update!(**args) end |
Instance Attribute Details
#iam_policy_data ⇒ Google::Apis::SecuritycenterV1::Policy
An Identity and Access Management (IAM) policy, which specifies access
controls for Google Cloud resources. A Policy
is a collection of bindings
.
A binding
binds one or more members
, or principals, to a single role
.
Principals can be user accounts, service accounts, Google groups, and domains (
such as G Suite). A role
is a named list of permissions; each role
can be
an IAM predefined role or a user-created custom role. For some types of Google
Cloud resources, a binding
can also specify a condition
, which is a
logical expression that allows access to a resource only if the expression
evaluates to true
. A condition can add constraints based on attributes of
the request, the resource, or both. To learn which resources support
conditions in their IAM policies, see the IAM documentation. JSON example: ` "
bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
"user:mike@example.com", "group:admins@example.com", "domain:google.com", "
serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
], "condition": ` "title": "expirable access", "description": "Does not grant
access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 `
YAML
example: bindings: - members: - user:mike@example.com - group:admins@
example.com - domain:google.com - serviceAccount:my-project-id@appspot.
gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
title: expirable access description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
BwWWja0YfJA= version: 3
For a description of IAM and its features, see the
IAM documentation.
Corresponds to the JSON property iamPolicyData
10319 10320 10321 |
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10319 def iam_policy_data @iam_policy_data end |
#resource_data ⇒ Hash<String,Object>
Optional. A representation of the Google Cloud resource. Should match the
Google Cloud resource JSON format.
Corresponds to the JSON property resourceData
10325 10326 10327 |
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10325 def resource_data @resource_data end |
#resource_type ⇒ String
Required. The type of the resource, for example, compute.googleapis.com/Disk
.
Corresponds to the JSON property resourceType
10330 10331 10332 |
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10330 def resource_type @resource_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
10337 10338 10339 10340 10341 |
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 10337 def update!(**args) @iam_policy_data = args[:iam_policy_data] if args.key?(:iam_policy_data) @resource_data = args[:resource_data] if args.key?(:resource_data) @resource_type = args[:resource_type] if args.key?(:resource_type) end |