diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter/__init__.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter/__init__.py index b51a30f15ad8..77032152de42 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter/__init__.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter/__init__.py @@ -31,6 +31,10 @@ ) from google.cloud.securitycenter_v1.types.asset import Asset from google.cloud.securitycenter_v1.types.bigquery_export import BigQueryExport +from google.cloud.securitycenter_v1.types.cloud_dlp_data_profile import ( + CloudDlpDataProfile, +) +from google.cloud.securitycenter_v1.types.cloud_dlp_inspection import CloudDlpInspection from google.cloud.securitycenter_v1.types.compliance import Compliance from google.cloud.securitycenter_v1.types.connection import Connection from google.cloud.securitycenter_v1.types.contact_details import Contact, ContactDetails @@ -145,6 +149,8 @@ "ServiceAccountDelegationInfo", "Asset", "BigQueryExport", + "CloudDlpDataProfile", + "CloudDlpInspection", "Compliance", "Connection", "Contact", diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/__init__.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/__init__.py index 7b1268e05db6..3ad58261996a 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/__init__.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/__init__.py @@ -22,6 +22,8 @@ from .types.access import Access, Geolocation, ServiceAccountDelegationInfo from .types.asset import Asset from .types.bigquery_export import BigQueryExport +from .types.cloud_dlp_data_profile import CloudDlpDataProfile +from .types.cloud_dlp_inspection import CloudDlpInspection from .types.compliance import Compliance from .types.connection import Connection from .types.contact_details import Contact, ContactDetails @@ -119,6 +121,8 @@ "BigQueryExport", "BulkMuteFindingsRequest", "BulkMuteFindingsResponse", + "CloudDlpDataProfile", + "CloudDlpInspection", "Compliance", "Connection", "Contact", diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/async_client.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/async_client.py index 1a7a539967d6..bd0e49d1b839 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/async_client.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/async_client.py @@ -55,6 +55,8 @@ from google.cloud.securitycenter_v1.types import ( access, bigquery_export, + cloud_dlp_data_profile, + cloud_dlp_inspection, compliance, connection, container, @@ -118,6 +120,8 @@ class SecurityCenterAsyncClient: parse_big_query_export_path = staticmethod( SecurityCenterClient.parse_big_query_export_path ) + dlp_job_path = staticmethod(SecurityCenterClient.dlp_job_path) + parse_dlp_job_path = staticmethod(SecurityCenterClient.parse_dlp_job_path) effective_security_health_analytics_custom_module_path = staticmethod( SecurityCenterClient.effective_security_health_analytics_custom_module_path ) @@ -156,6 +160,10 @@ class SecurityCenterAsyncClient: ) source_path = staticmethod(SecurityCenterClient.source_path) parse_source_path = staticmethod(SecurityCenterClient.parse_source_path) + table_data_profile_path = staticmethod(SecurityCenterClient.table_data_profile_path) + parse_table_data_profile_path = staticmethod( + SecurityCenterClient.parse_table_data_profile_path + ) topic_path = staticmethod(SecurityCenterClient.topic_path) parse_topic_path = staticmethod(SecurityCenterClient.parse_topic_path) common_billing_account_path = staticmethod( @@ -495,8 +503,8 @@ async def sample_create_security_health_analytics_custom_module(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.CreateSecurityHealthAnalyticsCustomModuleRequest, dict]]): - The request object. Request message for creating security - health analytics custom modules. + The request object. Request message for creating Security + Health Analytics custom modules. parent (:class:`str`): Required. Resource name of the new custom module's parent. Its format is @@ -1352,8 +1360,8 @@ async def sample_delete_security_health_analytics_custom_module(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.DeleteSecurityHealthAnalyticsCustomModuleRequest, dict]]): - The request object. Request message for deleting security - health analytics custom modules. + The request object. Request message for deleting Security + Health Analytics custom modules. name (:class:`str`): Required. Name of the custom module to delete. Its format is @@ -2089,7 +2097,7 @@ async def sample_get_effective_security_health_analytics_custom_module(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, dict]]): The request object. Request message for getting effective - security health analytics custom + Security Health Analytics custom modules. name (:class:`str`): Required. Name of the effective @@ -2224,8 +2232,8 @@ async def sample_get_security_health_analytics_custom_module(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.GetSecurityHealthAnalyticsCustomModuleRequest, dict]]): - The request object. Request message for getting security - health analytics custom modules. + The request object. Request message for getting Security + Health Analytics custom modules. name (:class:`str`): Required. Name of the custom module to get. Its format is @@ -2848,7 +2856,7 @@ async def sample_list_descendant_security_health_analytics_custom_modules(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, dict]]): The request object. Request message for listing - descendant security health analytics + descendant Security Health Analytics custom modules. parent (:class:`str`): Required. Name of parent to list @@ -2870,7 +2878,7 @@ async def sample_list_descendant_security_health_analytics_custom_modules(): Returns: google.cloud.securitycenter_v1.services.security_center.pagers.ListDescendantSecurityHealthAnalyticsCustomModulesAsyncPager: Response message for listing - descendant security health analytics + descendant Security Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages @@ -3346,7 +3354,7 @@ async def sample_list_effective_security_health_analytics_custom_modules(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, dict]]): The request object. Request message for listing effective - security health analytics custom + Security Health Analytics custom modules. parent (:class:`str`): Required. Name of parent to list @@ -3368,7 +3376,7 @@ async def sample_list_effective_security_health_analytics_custom_modules(): Returns: google.cloud.securitycenter_v1.services.security_center.pagers.ListEffectiveSecurityHealthAnalyticsCustomModulesAsyncPager: Response message for listing - effective security health analytics + effective Security Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages @@ -3487,8 +3495,8 @@ async def sample_list_security_health_analytics_custom_modules(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.ListSecurityHealthAnalyticsCustomModulesRequest, dict]]): - The request object. Request message for listing security - health analytics custom modules. + The request object. Request message for listing Security + Health Analytics custom modules. parent (:class:`str`): Required. Name of parent to list custom modules. Its format is @@ -3508,8 +3516,8 @@ async def sample_list_security_health_analytics_custom_modules(): Returns: google.cloud.securitycenter_v1.services.security_center.pagers.ListSecurityHealthAnalyticsCustomModulesAsyncPager: - Response message for listing security - health analytics custom modules. + Response message for listing Security + Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages automatically. @@ -4994,7 +5002,7 @@ async def update_security_health_analytics_custom_module( the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have - an enablement state of “inherited”). Updating the + an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only. @@ -5025,8 +5033,8 @@ async def sample_update_security_health_analytics_custom_module(): Args: request (Optional[Union[google.cloud.securitycenter_v1.types.UpdateSecurityHealthAnalyticsCustomModuleRequest, dict]]): - The request object. Request message for updating security - health analytics custom modules. + The request object. Request message for updating Security + Health Analytics custom modules. security_health_analytics_custom_module (:class:`google.cloud.securitycenter_v1.types.SecurityHealthAnalyticsCustomModule`): Required. The SecurityHealthAnalytics custom module to update. diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/client.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/client.py index a5124395a641..c01b290dc3c3 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/client.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/client.py @@ -59,6 +59,8 @@ from google.cloud.securitycenter_v1.types import ( access, bigquery_export, + cloud_dlp_data_profile, + cloud_dlp_inspection, compliance, connection, container, @@ -270,6 +272,23 @@ def parse_big_query_export_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def dlp_job_path( + project: str, + dlp_job: str, + ) -> str: + """Returns a fully-qualified dlp_job string.""" + return "projects/{project}/dlpJobs/{dlp_job}".format( + project=project, + dlp_job=dlp_job, + ) + + @staticmethod + def parse_dlp_job_path(path: str) -> Dict[str, str]: + """Parses a dlp_job path into its component segments.""" + m = re.match(r"^projects/(?P.+?)/dlpJobs/(?P.+?)$", path) + return m.groupdict() if m else {} + @staticmethod def effective_security_health_analytics_custom_module_path( organization: str, @@ -456,6 +475,25 @@ def parse_source_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def table_data_profile_path( + project: str, + table_profile: str, + ) -> str: + """Returns a fully-qualified table_data_profile string.""" + return "projects/{project}/tableProfiles/{table_profile}".format( + project=project, + table_profile=table_profile, + ) + + @staticmethod + def parse_table_data_profile_path(path: str) -> Dict[str, str]: + """Parses a table_data_profile path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/tableProfiles/(?P.+?)$", path + ) + return m.groupdict() if m else {} + @staticmethod def topic_path( project: str, @@ -900,8 +938,8 @@ def sample_create_security_health_analytics_custom_module(): Args: request (Union[google.cloud.securitycenter_v1.types.CreateSecurityHealthAnalyticsCustomModuleRequest, dict]): - The request object. Request message for creating security - health analytics custom modules. + The request object. Request message for creating Security + Health Analytics custom modules. parent (str): Required. Resource name of the new custom module's parent. Its format is @@ -1770,8 +1808,8 @@ def sample_delete_security_health_analytics_custom_module(): Args: request (Union[google.cloud.securitycenter_v1.types.DeleteSecurityHealthAnalyticsCustomModuleRequest, dict]): - The request object. Request message for deleting security - health analytics custom modules. + The request object. Request message for deleting Security + Health Analytics custom modules. name (str): Required. Name of the custom module to delete. Its format is @@ -2483,7 +2521,7 @@ def sample_get_effective_security_health_analytics_custom_module(): Args: request (Union[google.cloud.securitycenter_v1.types.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, dict]): The request object. Request message for getting effective - security health analytics custom + Security Health Analytics custom modules. name (str): Required. Name of the effective @@ -2613,8 +2651,8 @@ def sample_get_security_health_analytics_custom_module(): Args: request (Union[google.cloud.securitycenter_v1.types.GetSecurityHealthAnalyticsCustomModuleRequest, dict]): - The request object. Request message for getting security - health analytics custom modules. + The request object. Request message for getting Security + Health Analytics custom modules. name (str): Required. Name of the custom module to get. Its format is @@ -3196,7 +3234,7 @@ def sample_list_descendant_security_health_analytics_custom_modules(): Args: request (Union[google.cloud.securitycenter_v1.types.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, dict]): The request object. Request message for listing - descendant security health analytics + descendant Security Health Analytics custom modules. parent (str): Required. Name of parent to list @@ -3218,7 +3256,7 @@ def sample_list_descendant_security_health_analytics_custom_modules(): Returns: google.cloud.securitycenter_v1.services.security_center.pagers.ListDescendantSecurityHealthAnalyticsCustomModulesPager: Response message for listing - descendant security health analytics + descendant Security Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages @@ -3674,7 +3712,7 @@ def sample_list_effective_security_health_analytics_custom_modules(): Args: request (Union[google.cloud.securitycenter_v1.types.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, dict]): The request object. Request message for listing effective - security health analytics custom + Security Health Analytics custom modules. parent (str): Required. Name of parent to list @@ -3696,7 +3734,7 @@ def sample_list_effective_security_health_analytics_custom_modules(): Returns: google.cloud.securitycenter_v1.services.security_center.pagers.ListEffectiveSecurityHealthAnalyticsCustomModulesPager: Response message for listing - effective security health analytics + effective Security Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages @@ -3810,8 +3848,8 @@ def sample_list_security_health_analytics_custom_modules(): Args: request (Union[google.cloud.securitycenter_v1.types.ListSecurityHealthAnalyticsCustomModulesRequest, dict]): - The request object. Request message for listing security - health analytics custom modules. + The request object. Request message for listing Security + Health Analytics custom modules. parent (str): Required. Name of parent to list custom modules. Its format is @@ -3831,8 +3869,8 @@ def sample_list_security_health_analytics_custom_modules(): Returns: google.cloud.securitycenter_v1.services.security_center.pagers.ListSecurityHealthAnalyticsCustomModulesPager: - Response message for listing security - health analytics custom modules. + Response message for listing Security + Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages automatically. @@ -5295,7 +5333,7 @@ def update_security_health_analytics_custom_module( the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have - an enablement state of “inherited”). Updating the + an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only. @@ -5326,8 +5364,8 @@ def sample_update_security_health_analytics_custom_module(): Args: request (Union[google.cloud.securitycenter_v1.types.UpdateSecurityHealthAnalyticsCustomModuleRequest, dict]): - The request object. Request message for updating security - health analytics custom modules. + The request object. Request message for updating Security + Health Analytics custom modules. security_health_analytics_custom_module (google.cloud.securitycenter_v1.types.SecurityHealthAnalyticsCustomModule): Required. The SecurityHealthAnalytics custom module to update. diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc.py index dd20ebcf25a3..f7d331616de3 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc.py @@ -1396,7 +1396,7 @@ def update_security_health_analytics_custom_module( the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have - an enablement state of “inherited”). Updating the + an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only. diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc_asyncio.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc_asyncio.py index 410c1c984be4..3ecfb7e3dc93 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc_asyncio.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/grpc_asyncio.py @@ -1430,7 +1430,7 @@ def update_security_health_analytics_custom_module( the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have - an enablement state of “inherited”). Updating the + an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only. diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/rest.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/rest.py index 5a1ed8f030f9..52e568f7c6df 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/rest.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/services/security_center/transports/rest.py @@ -2299,8 +2299,8 @@ def __call__( Args: request (~.securitycenter_service.CreateSecurityHealthAnalyticsCustomModuleRequest): - The request object. Request message for creating security - health analytics custom modules. + The request object. Request message for creating Security + Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2791,8 +2791,8 @@ def __call__( Args: request (~.securitycenter_service.DeleteSecurityHealthAnalyticsCustomModuleRequest): - The request object. Request message for deleting security - health analytics custom modules. + The request object. Request message for deleting Security + Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2982,7 +2982,7 @@ def __call__( Args: request (~.securitycenter_service.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest): The request object. Request message for getting effective - security health analytics custom + Security Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3570,8 +3570,8 @@ def __call__( Args: request (~.securitycenter_service.GetSecurityHealthAnalyticsCustomModuleRequest): - The request object. Request message for getting security - health analytics custom modules. + The request object. Request message for getting Security + Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -4194,7 +4194,7 @@ def __call__( Args: request (~.securitycenter_service.ListDescendantSecurityHealthAnalyticsCustomModulesRequest): The request object. Request message for listing - descendant security health analytics + descendant Security Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -4205,7 +4205,7 @@ def __call__( Returns: ~.securitycenter_service.ListDescendantSecurityHealthAnalyticsCustomModulesResponse: Response message for listing - descendant security health analytics + descendant Security Health Analytics custom modules. """ @@ -4307,7 +4307,7 @@ def __call__( Args: request (~.securitycenter_service.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest): The request object. Request message for listing effective - security health analytics custom + Security Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -4318,7 +4318,7 @@ def __call__( Returns: ~.securitycenter_service.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse: Response message for listing - effective security health analytics + effective Security Health Analytics custom modules. """ @@ -4716,8 +4716,8 @@ def __call__( Args: request (~.securitycenter_service.ListSecurityHealthAnalyticsCustomModulesRequest): - The request object. Request message for listing security - health analytics custom modules. + The request object. Request message for listing Security + Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -4726,8 +4726,8 @@ def __call__( Returns: ~.securitycenter_service.ListSecurityHealthAnalyticsCustomModulesResponse: - Response message for listing security - health analytics custom modules. + Response message for listing Security + Health Analytics custom modules. """ @@ -6186,8 +6186,8 @@ def __call__( Args: request (~.securitycenter_service.UpdateSecurityHealthAnalyticsCustomModuleRequest): - The request object. Request message for updating security - health analytics custom modules. + The request object. Request message for updating Security + Health Analytics custom modules. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/__init__.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/__init__.py index f73d61aebc43..fc721b6d35f0 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/__init__.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/__init__.py @@ -16,6 +16,8 @@ from .access import Access, Geolocation, ServiceAccountDelegationInfo from .asset import Asset from .bigquery_export import BigQueryExport +from .cloud_dlp_data_profile import CloudDlpDataProfile +from .cloud_dlp_inspection import CloudDlpInspection from .compliance import Compliance from .connection import Connection from .contact_details import Contact, ContactDetails @@ -110,6 +112,8 @@ "ServiceAccountDelegationInfo", "Asset", "BigQueryExport", + "CloudDlpDataProfile", + "CloudDlpInspection", "Compliance", "Connection", "Contact", diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/access.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/access.py index 416b3c994ecb..8fc7369268de 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/access.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/access.py @@ -36,9 +36,9 @@ class Access(proto.Message): principal_email (str): Associated email, such as "foo@google.com". - The email address of the authenticated user (or service - account on behalf of third party principal) making the - request. For third party identity callers, the + The email address of the authenticated user or a service + account acting on behalf of a third party principal making + the request. For third party identity callers, the ``principal_subject`` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see `Caller @@ -50,9 +50,9 @@ class Access(proto.Message): The caller IP's geolocation, which identifies where the call came from. user_agent_family (str): - What kind of user agent is associated, for - example operating system shells, embedded or - stand-alone applications, etc. + Type of user agent associated with the + finding. For example, an operating system shell + or an embedded or standalone application. service_name (str): This is the API service that the service account made a call to, e.g. @@ -61,42 +61,38 @@ class Access(proto.Message): The method that the service account called, e.g. "SetIamPolicy". principal_subject (str): - A string representing the principal_subject associated with - the identity. As compared to ``principal_email``, supports - principals that aren't associated with email addresses, such - as third party principals. For most identities, the format - will be - ``principal://iam.googleapis.com/{identity pool name}/subjects/{subject}`` - except for some GKE identities (GKE_WORKLOAD, FREEFORM, - GKE_HUB_WORKLOAD) that are still in the legacy format - ``serviceAccount:{identity pool name}[{subject}]`` + A string that represents the principal_subject that is + associated with the identity. Unlike ``principal_email``, + ``principal_subject`` supports principals that aren't + associated with email addresses, such as third party + principals. For most identities, the format is + ``principal://iam.googleapis.com/{identity pool name}/subject/{subject}``. + Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and + GKE_HUB_WORKLOAD, still use the legacy format + ``serviceAccount:{identity pool name}[{subject}]``. service_account_key_name (str): - The name of the service account key used to create or - exchange credentials for authenticating the service account - making the request. This is a scheme-less URI full resource - name. For example: + The name of the service account key that was used to create + or exchange credentials when authenticating the service + account that made the request. This is a scheme-less URI + full resource name. For example: "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}". service_account_delegation_info (MutableSequence[google.cloud.securitycenter_v1.types.ServiceAccountDelegationInfo]): - Identity delegation history of an - authenticated service account that makes the - request. It contains information on the real - authorities that try to access GCP resources by - delegating on a service account. When multiple - authorities are present, they are guaranteed to - be sorted based on the original ordering of the - identity delegation events. + The identity delegation history of an authenticated service + account that made the request. The + ``serviceAccountDelegationInfo[]`` object contains + information about the real authorities that try to access + Google Cloud resources by delegating on a service account. + When multiple authorities are present, they are guaranteed + to be sorted based on the original ordering of the identity + delegation events. user_name (str): - A string that represents the username of a - user, user account, or other entity involved in - the access event. What the entity is and what - its role in the access event is depends on the - finding that this field appears in. The entity - is likely not an IAM principal, but could be a - user that is logged into an operating system, if - the finding is VM-related, or a user that is - logged into some type of application that is - involved in the access event. + A string that represents a username. The + username provided depends on the type of the + finding and is likely not an IAM principal. For + example, this can be a system username if the + finding is related to a virtual machine, or it + can be an application login username. """ principal_email: str = proto.Field( diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/cloud_dlp_data_profile.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/cloud_dlp_data_profile.py new file mode 100644 index 000000000000..349a8e6f1a3e --- /dev/null +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/cloud_dlp_data_profile.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +__protobuf__ = proto.module( + package="google.cloud.securitycenter.v1", + manifest={ + "CloudDlpDataProfile", + }, +) + + +class CloudDlpDataProfile(proto.Message): + r"""The `data + profile `__ + associated with the finding. + + Attributes: + data_profile (str): + Name of the data profile, for example, + ``projects/123/locations/europe/tableProfiles/8383929``. + """ + + data_profile: str = proto.Field( + proto.STRING, + number=1, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/cloud_dlp_inspection.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/cloud_dlp_inspection.py new file mode 100644 index 000000000000..0a7f03b658c7 --- /dev/null +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/cloud_dlp_inspection.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +__protobuf__ = proto.module( + package="google.cloud.securitycenter.v1", + manifest={ + "CloudDlpInspection", + }, +) + + +class CloudDlpInspection(proto.Message): + r"""Details about the Cloud Data Loss Prevention (Cloud DLP) `inspection + job `__ + that produced the finding. + + Attributes: + inspect_job (str): + Name of the inspection job, for example, + ``projects/123/locations/europe/dlpJobs/i-8383929``. + info_type (str): + The `type of + information `__ + found, for example, ``EMAIL_ADDRESS`` or ``STREET_ADDRESS``. + info_type_count (int): + The number of times Cloud DLP found this + infoType within this job and resource. + full_scan (bool): + Whether Cloud DLP scanned the complete + resource or a sampled subset. + """ + + inspect_job: str = proto.Field( + proto.STRING, + number=1, + ) + info_type: str = proto.Field( + proto.STRING, + number=2, + ) + info_type_count: int = proto.Field( + proto.INT64, + number=3, + ) + full_scan: bool = proto.Field( + proto.BOOL, + number=4, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/finding.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/finding.py index 4fa963756915..f4963cd42901 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/finding.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/finding.py @@ -28,6 +28,12 @@ container, ) from google.cloud.securitycenter_v1.types import external_system, file, iam_binding +from google.cloud.securitycenter_v1.types import ( + cloud_dlp_data_profile as gcs_cloud_dlp_data_profile, +) +from google.cloud.securitycenter_v1.types import ( + cloud_dlp_inspection as gcs_cloud_dlp_inspection, +) from google.cloud.securitycenter_v1.types import exfiltration as gcs_exfiltration from google.cloud.securitycenter_v1.types import kernel_rootkit as gcs_kernel_rootkit from google.cloud.securitycenter_v1.types import mitre_attack as gcs_mitre_attack @@ -57,10 +63,12 @@ class Finding(proto.Message): Attributes: name (str): - The relative resource name of this finding. See: - https://cloud.google.com/apis/design/resource_names#relative_resource_name - Example: - "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}". + The `relative resource + name `__ + of the finding. Example: + "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + "projects/{project_id}/sources/{source_id}/findings/{finding_id}". parent (str): The relative resource name of the source the finding belongs to. See: @@ -130,11 +138,12 @@ class Finding(proto.Message): finding_class (google.cloud.securitycenter_v1.types.Finding.FindingClass): The class of the finding. indicator (google.cloud.securitycenter_v1.types.Indicator): - Represents what's commonly known as an Indicator of - compromise (IoC) in computer forensics. This is an artifact + Represents what's commonly known as an *indicator of + compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with - high confidence, indicates a computer intrusion. Reference: - https://en.wikipedia.org/wiki/Indicator_of_compromise + high confidence, indicates a computer intrusion. For more + information, see `Indicator of + compromise `__. vulnerability (google.cloud.securitycenter_v1.types.Vulnerability): Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common @@ -151,18 +160,17 @@ class Finding(proto.Message): MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org access (google.cloud.securitycenter_v1.types.Access): - Access details associated to the Finding, + Access details associated with the finding, such as more information on the caller, which - method was accessed, from where, etc. + method was accessed, and from where. connections (MutableSequence[google.cloud.securitycenter_v1.types.Connection]): Contains information about the IP connection associated with the finding. mute_initiator (str): - First known as mute_annotation. Records additional - information about the mute operation e.g. mute config that - muted the finding, user who muted the finding, etc. Unlike - other attributes of a finding, a finding provider shouldn't - set the value of mute. + Records additional information about the mute operation, for + example, the `mute + configuration `__ + that muted the finding and the user who muted the finding. processes (MutableSequence[google.cloud.securitycenter_v1.types.Process]): Represents operating system processes associated with the Finding. @@ -195,23 +203,23 @@ class Finding(proto.Message): of the finding source such as "Event Threat Detection" or "Security Health Analytics". description (str): - Contains more detail about the finding. + Contains more details about the finding. exfiltration (google.cloud.securitycenter_v1.types.Exfiltration): - Represents exfiltration associated with the - Finding. + Represents exfiltrations associated with the + finding. iam_bindings (MutableSequence[google.cloud.securitycenter_v1.types.IamBinding]): Represents IAM bindings associated with the - Finding. + finding. next_steps (str): - Next steps associate to the finding. + Steps to address the finding. module_name (str): Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 containers (MutableSequence[google.cloud.securitycenter_v1.types.Container]): - Containers associated with the finding. - containers provides information for both - Kubernetes and non-Kubernetes containers. + Containers associated with the finding. This + field provides information for both Kubernetes + and non-Kubernetes containers. kubernetes (google.cloud.securitycenter_v1.types.Kubernetes): Kubernetes resources associated with the finding. @@ -219,8 +227,15 @@ class Finding(proto.Message): Database associated with the finding. files (MutableSequence[google.cloud.securitycenter_v1.types.File]): File associated with the finding. + cloud_dlp_inspection (google.cloud.securitycenter_v1.types.CloudDlpInspection): + Cloud Data Loss Prevention (Cloud DLP) + inspection results that are associated with the + finding. + cloud_dlp_data_profile (google.cloud.securitycenter_v1.types.CloudDlpDataProfile): + Cloud DLP data profile that is associated + with the finding. kernel_rootkit (google.cloud.securitycenter_v1.types.KernelRootkit): - Kernel Rootkit signature. + Signature of the kernel rootkit. """ class State(proto.Enum): @@ -256,8 +271,9 @@ class Severity(proto.Enum): exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible - unprotected user data, public SSH access with - weak or no passwords, etc. + unprotected user data and public SSH access with + weak or no passwords. + Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized @@ -534,6 +550,18 @@ class FindingClass(proto.Enum): number=46, message=file.File, ) + cloud_dlp_inspection: gcs_cloud_dlp_inspection.CloudDlpInspection = proto.Field( + proto.MESSAGE, + number=48, + message=gcs_cloud_dlp_inspection.CloudDlpInspection, + ) + cloud_dlp_data_profile: gcs_cloud_dlp_data_profile.CloudDlpDataProfile = ( + proto.Field( + proto.MESSAGE, + number=49, + message=gcs_cloud_dlp_data_profile.CloudDlpDataProfile, + ) + ) kernel_rootkit: gcs_kernel_rootkit.KernelRootkit = proto.Field( proto.MESSAGE, number=50, diff --git a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/securitycenter_service.py b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/securitycenter_service.py index 7fc55cffb17d..21e029f032e8 100644 --- a/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/securitycenter_service.py +++ b/packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/securitycenter_service.py @@ -272,7 +272,7 @@ class CreateNotificationConfigRequest(proto.Message): class CreateSecurityHealthAnalyticsCustomModuleRequest(proto.Message): - r"""Request message for creating security health analytics custom + r"""Request message for creating Security Health Analytics custom modules. Attributes: @@ -361,7 +361,7 @@ class DeleteNotificationConfigRequest(proto.Message): class DeleteSecurityHealthAnalyticsCustomModuleRequest(proto.Message): - r"""Request message for deleting security health analytics custom + r"""Request message for deleting Security Health Analytics custom modules. Attributes: @@ -450,8 +450,8 @@ class GetOrganizationSettingsRequest(proto.Message): class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(proto.Message): - r"""Request message for getting effective security health - analytics custom modules. + r"""Request message for getting effective Security Health + Analytics custom modules. Attributes: name (str): @@ -470,7 +470,7 @@ class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(proto.Message): class GetSecurityHealthAnalyticsCustomModuleRequest(proto.Message): - r"""Request message for getting security health analytics custom + r"""Request message for getting Security Health Analytics custom modules. Attributes: @@ -1003,8 +1003,8 @@ class GroupResult(proto.Message): class ListDescendantSecurityHealthAnalyticsCustomModulesRequest(proto.Message): - r"""Request message for listing descendant security health - analytics custom modules. + r"""Request message for listing descendant Security Health + Analytics custom modules. Attributes: parent (str): @@ -1038,8 +1038,8 @@ class ListDescendantSecurityHealthAnalyticsCustomModulesRequest(proto.Message): class ListDescendantSecurityHealthAnalyticsCustomModulesResponse(proto.Message): - r"""Response message for listing descendant security health - analytics custom modules. + r"""Response message for listing descendant Security Health + Analytics custom modules. Attributes: security_health_analytics_custom_modules (MutableSequence[google.cloud.securitycenter_v1.types.SecurityHealthAnalyticsCustomModule]): @@ -1196,8 +1196,8 @@ def raw_page(self): class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(proto.Message): - r"""Request message for listing effective security health - analytics custom modules. + r"""Request message for listing effective Security Health + Analytics custom modules. Attributes: parent (str): @@ -1231,8 +1231,8 @@ class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(proto.Message): class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(proto.Message): - r"""Response message for listing effective security health - analytics custom modules. + r"""Response message for listing effective Security Health + Analytics custom modules. Attributes: effective_security_health_analytics_custom_modules (MutableSequence[google.cloud.securitycenter_v1.types.EffectiveSecurityHealthAnalyticsCustomModule]): @@ -1261,7 +1261,7 @@ def raw_page(self): class ListSecurityHealthAnalyticsCustomModulesRequest(proto.Message): - r"""Request message for listing security health analytics custom + r"""Request message for listing Security Health Analytics custom modules. Attributes: @@ -1296,7 +1296,7 @@ class ListSecurityHealthAnalyticsCustomModulesRequest(proto.Message): class ListSecurityHealthAnalyticsCustomModulesResponse(proto.Message): - r"""Response message for listing security health analytics custom + r"""Response message for listing Security Health Analytics custom modules. Attributes: @@ -2245,7 +2245,7 @@ class UpdateOrganizationSettingsRequest(proto.Message): class UpdateSecurityHealthAnalyticsCustomModuleRequest(proto.Message): - r"""Request message for updating security health analytics custom + r"""Request message for updating Security Health Analytics custom modules. Attributes: diff --git a/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1.json index 139ac8de1e43..ec678e1a8024 100644 --- a/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-securitycenter", - "version": "1.20.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1beta1.json index a79447eff09e..a4c1295eaf99 100644 --- a/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-securitycenter", - "version": "1.20.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json index 431082da4c09..774592ce11f7 100644 --- a/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated_samples/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-securitycenter", - "version": "1.20.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-securitycenter/tests/unit/gapic/securitycenter_v1/test_security_center.py b/packages/google-cloud-securitycenter/tests/unit/gapic/securitycenter_v1/test_security_center.py index 3e9413029d83..b893a0587083 100644 --- a/packages/google-cloud-securitycenter/tests/unit/gapic/securitycenter_v1/test_security_center.py +++ b/packages/google-cloud-securitycenter/tests/unit/gapic/securitycenter_v1/test_security_center.py @@ -70,6 +70,8 @@ from google.cloud.securitycenter_v1.types import ( access, bigquery_export, + cloud_dlp_data_profile, + cloud_dlp_inspection, compliance, connection, contact_details, @@ -15511,6 +15513,13 @@ def test_create_finding_rest(request_type): "grantees": ["grantees_value1", "grantees_value2"], }, "files": {}, + "cloud_dlp_inspection": { + "inspect_job": "inspect_job_value", + "info_type": "info_type_value", + "info_type_count": 1621, + "full_scan": True, + }, + "cloud_dlp_data_profile": {"data_profile": "data_profile_value"}, "kernel_rootkit": { "name": "name_value", "unexpected_code_modification": True, @@ -15926,6 +15935,13 @@ def test_create_finding_rest_bad_request( "grantees": ["grantees_value1", "grantees_value2"], }, "files": {}, + "cloud_dlp_inspection": { + "inspect_job": "inspect_job_value", + "info_type": "info_type_value", + "info_type_count": 1621, + "full_scan": True, + }, + "cloud_dlp_data_profile": {"data_profile": "data_profile_value"}, "kernel_rootkit": { "name": "name_value", "unexpected_code_modification": True, @@ -25103,6 +25119,13 @@ def test_update_finding_rest(request_type): "grantees": ["grantees_value1", "grantees_value2"], }, "files": {}, + "cloud_dlp_inspection": { + "inspect_job": "inspect_job_value", + "info_type": "info_type_value", + "info_type_count": 1621, + "full_scan": True, + }, + "cloud_dlp_data_profile": {"data_profile": "data_profile_value"}, "kernel_rootkit": { "name": "name_value", "unexpected_code_modification": True, @@ -25493,6 +25516,13 @@ def test_update_finding_rest_bad_request( "grantees": ["grantees_value1", "grantees_value2"], }, "files": {}, + "cloud_dlp_inspection": { + "inspect_job": "inspect_job_value", + "info_type": "info_type_value", + "info_type_count": 1621, + "full_scan": True, + }, + "cloud_dlp_data_profile": {"data_profile": "data_profile_value"}, "kernel_rootkit": { "name": "name_value", "unexpected_code_modification": True, @@ -29515,9 +29545,32 @@ def test_parse_big_query_export_path(): assert expected == actual +def test_dlp_job_path(): + project = "winkle" + dlp_job = "nautilus" + expected = "projects/{project}/dlpJobs/{dlp_job}".format( + project=project, + dlp_job=dlp_job, + ) + actual = SecurityCenterClient.dlp_job_path(project, dlp_job) + assert expected == actual + + +def test_parse_dlp_job_path(): + expected = { + "project": "scallop", + "dlp_job": "abalone", + } + path = SecurityCenterClient.dlp_job_path(**expected) + + # Check that the path construction is reversible. + actual = SecurityCenterClient.parse_dlp_job_path(path) + assert expected == actual + + def test_effective_security_health_analytics_custom_module_path(): - organization = "winkle" - effective_custom_module = "nautilus" + organization = "squid" + effective_custom_module = "clam" expected = "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}".format( organization=organization, effective_custom_module=effective_custom_module, @@ -29532,8 +29585,8 @@ def test_effective_security_health_analytics_custom_module_path(): def test_parse_effective_security_health_analytics_custom_module_path(): expected = { - "organization": "scallop", - "effective_custom_module": "abalone", + "organization": "whelk", + "effective_custom_module": "octopus", } path = SecurityCenterClient.effective_security_health_analytics_custom_module_path( **expected @@ -29547,10 +29600,10 @@ def test_parse_effective_security_health_analytics_custom_module_path(): def test_external_system_path(): - organization = "squid" - source = "clam" - finding = "whelk" - externalsystem = "octopus" + organization = "oyster" + source = "nudibranch" + finding = "cuttlefish" + externalsystem = "mussel" expected = "organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}".format( organization=organization, source=source, @@ -29565,10 +29618,10 @@ def test_external_system_path(): def test_parse_external_system_path(): expected = { - "organization": "oyster", - "source": "nudibranch", - "finding": "cuttlefish", - "externalsystem": "mussel", + "organization": "winkle", + "source": "nautilus", + "finding": "scallop", + "externalsystem": "abalone", } path = SecurityCenterClient.external_system_path(**expected) @@ -29578,9 +29631,9 @@ def test_parse_external_system_path(): def test_finding_path(): - organization = "winkle" - source = "nautilus" - finding = "scallop" + organization = "squid" + source = "clam" + finding = "whelk" expected = ( "organizations/{organization}/sources/{source}/findings/{finding}".format( organization=organization, @@ -29594,9 +29647,9 @@ def test_finding_path(): def test_parse_finding_path(): expected = { - "organization": "abalone", - "source": "squid", - "finding": "clam", + "organization": "octopus", + "source": "oyster", + "finding": "nudibranch", } path = SecurityCenterClient.finding_path(**expected) @@ -29606,8 +29659,8 @@ def test_parse_finding_path(): def test_mute_config_path(): - organization = "whelk" - mute_config = "octopus" + organization = "cuttlefish" + mute_config = "mussel" expected = "organizations/{organization}/muteConfigs/{mute_config}".format( organization=organization, mute_config=mute_config, @@ -29618,8 +29671,8 @@ def test_mute_config_path(): def test_parse_mute_config_path(): expected = { - "organization": "oyster", - "mute_config": "nudibranch", + "organization": "winkle", + "mute_config": "nautilus", } path = SecurityCenterClient.mute_config_path(**expected) @@ -29629,8 +29682,8 @@ def test_parse_mute_config_path(): def test_notification_config_path(): - organization = "cuttlefish" - notification_config = "mussel" + organization = "scallop" + notification_config = "abalone" expected = ( "organizations/{organization}/notificationConfigs/{notification_config}".format( organization=organization, @@ -29645,8 +29698,8 @@ def test_notification_config_path(): def test_parse_notification_config_path(): expected = { - "organization": "winkle", - "notification_config": "nautilus", + "organization": "squid", + "notification_config": "clam", } path = SecurityCenterClient.notification_config_path(**expected) @@ -29656,7 +29709,7 @@ def test_parse_notification_config_path(): def test_organization_settings_path(): - organization = "scallop" + organization = "whelk" expected = "organizations/{organization}/organizationSettings".format( organization=organization, ) @@ -29666,7 +29719,7 @@ def test_organization_settings_path(): def test_parse_organization_settings_path(): expected = { - "organization": "abalone", + "organization": "octopus", } path = SecurityCenterClient.organization_settings_path(**expected) @@ -29676,8 +29729,8 @@ def test_parse_organization_settings_path(): def test_security_health_analytics_custom_module_path(): - organization = "squid" - custom_module = "clam" + organization = "oyster" + custom_module = "nudibranch" expected = "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}".format( organization=organization, custom_module=custom_module, @@ -29690,8 +29743,8 @@ def test_security_health_analytics_custom_module_path(): def test_parse_security_health_analytics_custom_module_path(): expected = { - "organization": "whelk", - "custom_module": "octopus", + "organization": "cuttlefish", + "custom_module": "mussel", } path = SecurityCenterClient.security_health_analytics_custom_module_path(**expected) @@ -29703,8 +29756,8 @@ def test_parse_security_health_analytics_custom_module_path(): def test_security_marks_path(): - organization = "oyster" - asset = "nudibranch" + organization = "winkle" + asset = "nautilus" expected = "organizations/{organization}/assets/{asset}/securityMarks".format( organization=organization, asset=asset, @@ -29715,8 +29768,8 @@ def test_security_marks_path(): def test_parse_security_marks_path(): expected = { - "organization": "cuttlefish", - "asset": "mussel", + "organization": "scallop", + "asset": "abalone", } path = SecurityCenterClient.security_marks_path(**expected) @@ -29726,8 +29779,8 @@ def test_parse_security_marks_path(): def test_source_path(): - organization = "winkle" - source = "nautilus" + organization = "squid" + source = "clam" expected = "organizations/{organization}/sources/{source}".format( organization=organization, source=source, @@ -29738,8 +29791,8 @@ def test_source_path(): def test_parse_source_path(): expected = { - "organization": "scallop", - "source": "abalone", + "organization": "whelk", + "source": "octopus", } path = SecurityCenterClient.source_path(**expected) @@ -29748,9 +29801,32 @@ def test_parse_source_path(): assert expected == actual +def test_table_data_profile_path(): + project = "oyster" + table_profile = "nudibranch" + expected = "projects/{project}/tableProfiles/{table_profile}".format( + project=project, + table_profile=table_profile, + ) + actual = SecurityCenterClient.table_data_profile_path(project, table_profile) + assert expected == actual + + +def test_parse_table_data_profile_path(): + expected = { + "project": "cuttlefish", + "table_profile": "mussel", + } + path = SecurityCenterClient.table_data_profile_path(**expected) + + # Check that the path construction is reversible. + actual = SecurityCenterClient.parse_table_data_profile_path(path) + assert expected == actual + + def test_topic_path(): - project = "squid" - topic = "clam" + project = "winkle" + topic = "nautilus" expected = "projects/{project}/topics/{topic}".format( project=project, topic=topic, @@ -29761,8 +29837,8 @@ def test_topic_path(): def test_parse_topic_path(): expected = { - "project": "whelk", - "topic": "octopus", + "project": "scallop", + "topic": "abalone", } path = SecurityCenterClient.topic_path(**expected) @@ -29772,7 +29848,7 @@ def test_parse_topic_path(): def test_common_billing_account_path(): - billing_account = "oyster" + billing_account = "squid" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -29782,7 +29858,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "nudibranch", + "billing_account": "clam", } path = SecurityCenterClient.common_billing_account_path(**expected) @@ -29792,7 +29868,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "cuttlefish" + folder = "whelk" expected = "folders/{folder}".format( folder=folder, ) @@ -29802,7 +29878,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "mussel", + "folder": "octopus", } path = SecurityCenterClient.common_folder_path(**expected) @@ -29812,7 +29888,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "winkle" + organization = "oyster" expected = "organizations/{organization}".format( organization=organization, ) @@ -29822,7 +29898,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "nautilus", + "organization": "nudibranch", } path = SecurityCenterClient.common_organization_path(**expected) @@ -29832,7 +29908,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "scallop" + project = "cuttlefish" expected = "projects/{project}".format( project=project, ) @@ -29842,7 +29918,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "abalone", + "project": "mussel", } path = SecurityCenterClient.common_project_path(**expected) @@ -29852,8 +29928,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "squid" - location = "clam" + project = "winkle" + location = "nautilus" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -29864,8 +29940,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "whelk", - "location": "octopus", + "project": "scallop", + "location": "abalone", } path = SecurityCenterClient.common_location_path(**expected)