Skip to content

Commit bf378f7

Browse files
feat: Add next_steps field to finding's list of attributes (#319)
- [ ] Regenerate this pull request now. feat: AuditConfig for IAM v1 fix(deps): require grpc-google-iam-v1 >=0.12.4 docs: fix type in docstring for map fields PiperOrigin-RevId: 440383959 Source-Link: googleapis/googleapis@6a276f6 Source-Link: googleapis/googleapis-gen@f94fc64 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjk0ZmM2NDA2MTgzNzAzM2JhYjg4YzY1MDc1ZTE4MTRlZGI2MTMzYSJ9
1 parent 7c884ac commit bf378f7

File tree

34 files changed

+740
-396
lines changed

34 files changed

+740
-396
lines changed

packages/google-cloud-securitycenter/google/cloud/securitycenter/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from google.cloud.securitycenter_v1.types.external_system import ExternalSystem
2929
from google.cloud.securitycenter_v1.types.finding import Finding
3030
from google.cloud.securitycenter_v1.types.folder import Folder
31+
from google.cloud.securitycenter_v1.types.iam_binding import IamBinding
3132
from google.cloud.securitycenter_v1.types.indicator import Indicator
3233
from google.cloud.securitycenter_v1.types.mitre_attack import MitreAttack
3334
from google.cloud.securitycenter_v1.types.mute_config import MuteConfig
@@ -182,6 +183,7 @@
182183
"ExternalSystem",
183184
"Finding",
184185
"Folder",
186+
"IamBinding",
185187
"Indicator",
186188
"MitreAttack",
187189
"MuteConfig",

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from .types.external_system import ExternalSystem
2525
from .types.finding import Finding
2626
from .types.folder import Folder
27+
from .types.iam_binding import IamBinding
2728
from .types.indicator import Indicator
2829
from .types.mitre_attack import MitreAttack
2930
from .types.mute_config import MuteConfig
@@ -113,6 +114,7 @@
113114
"GroupFindingsRequest",
114115
"GroupFindingsResponse",
115116
"GroupResult",
117+
"IamBinding",
116118
"Indicator",
117119
"ListAssetsRequest",
118120
"ListAssetsResponse",

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/async_client.py

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from google.cloud.securitycenter_v1.types import external_system as gcs_external_system
4040
from google.cloud.securitycenter_v1.types import finding
4141
from google.cloud.securitycenter_v1.types import finding as gcs_finding
42+
from google.cloud.securitycenter_v1.types import iam_binding
4243
from google.cloud.securitycenter_v1.types import indicator
4344
from google.cloud.securitycenter_v1.types import mitre_attack
4445
from google.cloud.securitycenter_v1.types import mute_config
@@ -1203,21 +1204,26 @@ def sample_get_iam_policy():
12031204
12041205
Returns:
12051206
google.iam.v1.policy_pb2.Policy:
1206-
Defines an Identity and Access Management (IAM) policy. It is used to
1207-
specify access control policies for Cloud Platform
1208-
resources.
1207+
An Identity and Access Management (IAM) policy, which specifies access
1208+
controls for Google Cloud resources.
12091209
12101210
A Policy is a collection of bindings. A binding binds
1211-
one or more members to a single role. Members can be
1212-
user accounts, service accounts, Google groups, and
1213-
domains (such as G Suite). A role is a named list of
1214-
permissions (defined by IAM or configured by users).
1215-
A binding can optionally specify a condition, which
1216-
is a logic expression that further constrains the
1217-
role binding based on attributes about the request
1218-
and/or target resource.
1219-
1220-
**JSON Example**
1211+
one or more members, or principals, to a single role.
1212+
Principals can be user accounts, service accounts,
1213+
Google groups, and domains (such as G Suite). A role
1214+
is a named list of permissions; each role can be an
1215+
IAM predefined role or a user-created custom role.
1216+
1217+
For some types of Google Cloud resources, a binding
1218+
can also specify a condition, which is a logical
1219+
expression that allows access to a resource only if
1220+
the expression evaluates to true. A condition can add
1221+
constraints based on attributes of the request, the
1222+
resource, or both. To learn which resources support
1223+
conditions in their IAM policies, see the [IAM
1224+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
1225+
1226+
**JSON example:**
12211227
12221228
{
12231229
"bindings": [
@@ -1232,17 +1238,17 @@ def sample_get_iam_policy():
12321238
12331239
}, { "role":
12341240
"roles/resourcemanager.organizationViewer",
1235-
"members": ["user:[email protected]"],
1241+
"members": [ "user:[email protected]" ],
12361242
"condition": { "title": "expirable access",
12371243
"description": "Does not grant access after
12381244
Sep 2020", "expression": "request.time <
12391245
timestamp('2020-10-01T00:00:00.000Z')", } }
12401246
1241-
]
1247+
], "etag": "BwWWja0YfJA=", "version": 3
12421248
12431249
}
12441250
1245-
**YAML Example**
1251+
**YAML example:**
12461252
12471253
bindings: - members: - user:\ [email protected] -
12481254
group:\ [email protected] - domain:google.com -
@@ -1253,11 +1259,12 @@ def sample_get_iam_policy():
12531259
condition: title: expirable access description:
12541260
Does not grant access after Sep 2020 expression:
12551261
request.time <
1256-
timestamp('2020-10-01T00:00:00.000Z')
1262+
timestamp('2020-10-01T00:00:00.000Z') etag:
1263+
BwWWja0YfJA= version: 3
12571264
12581265
For a description of IAM and its features, see the
1259-
[IAM developer's
1260-
guide](\ https://cloud.google.com/iam/docs).
1266+
[IAM
1267+
documentation](\ https://cloud.google.com/iam/docs/).
12611268
12621269
"""
12631270
# Create or coerce a protobuf request object.
@@ -2958,21 +2965,26 @@ def sample_set_iam_policy():
29582965
29592966
Returns:
29602967
google.iam.v1.policy_pb2.Policy:
2961-
Defines an Identity and Access Management (IAM) policy. It is used to
2962-
specify access control policies for Cloud Platform
2963-
resources.
2968+
An Identity and Access Management (IAM) policy, which specifies access
2969+
controls for Google Cloud resources.
29642970
29652971
A Policy is a collection of bindings. A binding binds
2966-
one or more members to a single role. Members can be
2967-
user accounts, service accounts, Google groups, and
2968-
domains (such as G Suite). A role is a named list of
2969-
permissions (defined by IAM or configured by users).
2970-
A binding can optionally specify a condition, which
2971-
is a logic expression that further constrains the
2972-
role binding based on attributes about the request
2973-
and/or target resource.
2974-
2975-
**JSON Example**
2972+
one or more members, or principals, to a single role.
2973+
Principals can be user accounts, service accounts,
2974+
Google groups, and domains (such as G Suite). A role
2975+
is a named list of permissions; each role can be an
2976+
IAM predefined role or a user-created custom role.
2977+
2978+
For some types of Google Cloud resources, a binding
2979+
can also specify a condition, which is a logical
2980+
expression that allows access to a resource only if
2981+
the expression evaluates to true. A condition can add
2982+
constraints based on attributes of the request, the
2983+
resource, or both. To learn which resources support
2984+
conditions in their IAM policies, see the [IAM
2985+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
2986+
2987+
**JSON example:**
29762988
29772989
{
29782990
"bindings": [
@@ -2987,17 +2999,17 @@ def sample_set_iam_policy():
29872999
29883000
}, { "role":
29893001
"roles/resourcemanager.organizationViewer",
2990-
"members": ["user:[email protected]"],
3002+
"members": [ "user:[email protected]" ],
29913003
"condition": { "title": "expirable access",
29923004
"description": "Does not grant access after
29933005
Sep 2020", "expression": "request.time <
29943006
timestamp('2020-10-01T00:00:00.000Z')", } }
29953007
2996-
]
3008+
], "etag": "BwWWja0YfJA=", "version": 3
29973009
29983010
}
29993011
3000-
**YAML Example**
3012+
**YAML example:**
30013013
30023014
bindings: - members: - user:\ [email protected] -
30033015
group:\ [email protected] - domain:google.com -
@@ -3008,11 +3020,12 @@ def sample_set_iam_policy():
30083020
condition: title: expirable access description:
30093021
Does not grant access after Sep 2020 expression:
30103022
request.time <
3011-
timestamp('2020-10-01T00:00:00.000Z')
3023+
timestamp('2020-10-01T00:00:00.000Z') etag:
3024+
BwWWja0YfJA= version: 3
30123025
30133026
For a description of IAM and its features, see the
3014-
[IAM developer's
3015-
guide](\ https://cloud.google.com/iam/docs).
3027+
[IAM
3028+
documentation](\ https://cloud.google.com/iam/docs/).
30163029
30173030
"""
30183031
# Create or coerce a protobuf request object.

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/client.py

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from google.cloud.securitycenter_v1.types import external_system as gcs_external_system
4343
from google.cloud.securitycenter_v1.types import finding
4444
from google.cloud.securitycenter_v1.types import finding as gcs_finding
45+
from google.cloud.securitycenter_v1.types import iam_binding
4546
from google.cloud.securitycenter_v1.types import indicator
4647
from google.cloud.securitycenter_v1.types import mitre_attack
4748
from google.cloud.securitycenter_v1.types import mute_config
@@ -1581,21 +1582,26 @@ def sample_get_iam_policy():
15811582
15821583
Returns:
15831584
google.iam.v1.policy_pb2.Policy:
1584-
Defines an Identity and Access Management (IAM) policy. It is used to
1585-
specify access control policies for Cloud Platform
1586-
resources.
1585+
An Identity and Access Management (IAM) policy, which specifies access
1586+
controls for Google Cloud resources.
15871587
15881588
A Policy is a collection of bindings. A binding binds
1589-
one or more members to a single role. Members can be
1590-
user accounts, service accounts, Google groups, and
1591-
domains (such as G Suite). A role is a named list of
1592-
permissions (defined by IAM or configured by users).
1593-
A binding can optionally specify a condition, which
1594-
is a logic expression that further constrains the
1595-
role binding based on attributes about the request
1596-
and/or target resource.
1597-
1598-
**JSON Example**
1589+
one or more members, or principals, to a single role.
1590+
Principals can be user accounts, service accounts,
1591+
Google groups, and domains (such as G Suite). A role
1592+
is a named list of permissions; each role can be an
1593+
IAM predefined role or a user-created custom role.
1594+
1595+
For some types of Google Cloud resources, a binding
1596+
can also specify a condition, which is a logical
1597+
expression that allows access to a resource only if
1598+
the expression evaluates to true. A condition can add
1599+
constraints based on attributes of the request, the
1600+
resource, or both. To learn which resources support
1601+
conditions in their IAM policies, see the [IAM
1602+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
1603+
1604+
**JSON example:**
15991605
16001606
{
16011607
"bindings": [
@@ -1610,17 +1616,17 @@ def sample_get_iam_policy():
16101616
16111617
}, { "role":
16121618
"roles/resourcemanager.organizationViewer",
1613-
"members": ["user:[email protected]"],
1619+
"members": [ "user:[email protected]" ],
16141620
"condition": { "title": "expirable access",
16151621
"description": "Does not grant access after
16161622
Sep 2020", "expression": "request.time <
16171623
timestamp('2020-10-01T00:00:00.000Z')", } }
16181624
1619-
]
1625+
], "etag": "BwWWja0YfJA=", "version": 3
16201626
16211627
}
16221628
1623-
**YAML Example**
1629+
**YAML example:**
16241630
16251631
bindings: - members: - user:\ [email protected] -
16261632
group:\ [email protected] - domain:google.com -
@@ -1631,11 +1637,12 @@ def sample_get_iam_policy():
16311637
condition: title: expirable access description:
16321638
Does not grant access after Sep 2020 expression:
16331639
request.time <
1634-
timestamp('2020-10-01T00:00:00.000Z')
1640+
timestamp('2020-10-01T00:00:00.000Z') etag:
1641+
BwWWja0YfJA= version: 3
16351642
16361643
For a description of IAM and its features, see the
1637-
[IAM developer's
1638-
guide](\ https://cloud.google.com/iam/docs).
1644+
[IAM
1645+
documentation](\ https://cloud.google.com/iam/docs/).
16391646
16401647
"""
16411648
# Create or coerce a protobuf request object.
@@ -3244,21 +3251,26 @@ def sample_set_iam_policy():
32443251
32453252
Returns:
32463253
google.iam.v1.policy_pb2.Policy:
3247-
Defines an Identity and Access Management (IAM) policy. It is used to
3248-
specify access control policies for Cloud Platform
3249-
resources.
3254+
An Identity and Access Management (IAM) policy, which specifies access
3255+
controls for Google Cloud resources.
32503256
32513257
A Policy is a collection of bindings. A binding binds
3252-
one or more members to a single role. Members can be
3253-
user accounts, service accounts, Google groups, and
3254-
domains (such as G Suite). A role is a named list of
3255-
permissions (defined by IAM or configured by users).
3256-
A binding can optionally specify a condition, which
3257-
is a logic expression that further constrains the
3258-
role binding based on attributes about the request
3259-
and/or target resource.
3260-
3261-
**JSON Example**
3258+
one or more members, or principals, to a single role.
3259+
Principals can be user accounts, service accounts,
3260+
Google groups, and domains (such as G Suite). A role
3261+
is a named list of permissions; each role can be an
3262+
IAM predefined role or a user-created custom role.
3263+
3264+
For some types of Google Cloud resources, a binding
3265+
can also specify a condition, which is a logical
3266+
expression that allows access to a resource only if
3267+
the expression evaluates to true. A condition can add
3268+
constraints based on attributes of the request, the
3269+
resource, or both. To learn which resources support
3270+
conditions in their IAM policies, see the [IAM
3271+
documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies).
3272+
3273+
**JSON example:**
32623274
32633275
{
32643276
"bindings": [
@@ -3273,17 +3285,17 @@ def sample_set_iam_policy():
32733285
32743286
}, { "role":
32753287
"roles/resourcemanager.organizationViewer",
3276-
"members": ["user:[email protected]"],
3288+
"members": [ "user:[email protected]" ],
32773289
"condition": { "title": "expirable access",
32783290
"description": "Does not grant access after
32793291
Sep 2020", "expression": "request.time <
32803292
timestamp('2020-10-01T00:00:00.000Z')", } }
32813293
3282-
]
3294+
], "etag": "BwWWja0YfJA=", "version": 3
32833295
32843296
}
32853297
3286-
**YAML Example**
3298+
**YAML example:**
32873299
32883300
bindings: - members: - user:\ [email protected] -
32893301
group:\ [email protected] - domain:google.com -
@@ -3294,11 +3306,12 @@ def sample_set_iam_policy():
32943306
condition: title: expirable access description:
32953307
Does not grant access after Sep 2020 expression:
32963308
request.time <
3297-
timestamp('2020-10-01T00:00:00.000Z')
3309+
timestamp('2020-10-01T00:00:00.000Z') etag:
3310+
BwWWja0YfJA= version: 3
32983311
32993312
For a description of IAM and its features, see the
3300-
[IAM developer's
3301-
guide](\ https://cloud.google.com/iam/docs).
3313+
[IAM
3314+
documentation](\ https://cloud.google.com/iam/docs/).
33023315
33033316
"""
33043317
# Create or coerce a protobuf request object.

0 commit comments

Comments
 (0)