Class SecurityCenterManagementAsyncClient (0.1.8)

SecurityCenterManagementAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.securitycentermanagement_v1.services.security_center_management.transports.base.SecurityCenterManagementTransport] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Service describing handlers for resources

Properties

api_endpoint

Return the API endpoint used by the client instance.

Returns
TypeDescription
strThe API endpoint used by the client instance.

transport

Returns the transport used by the client instance.

Returns
TypeDescription
SecurityCenterManagementTransportThe transport used by the client instance.

universe_domain

Return the universe domain used by the client instance.

Returns
TypeDescription
strThe universe domain used by the client instance.

Methods

SecurityCenterManagementAsyncClient

SecurityCenterManagementAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.securitycentermanagement_v1.services.security_center_management.transports.base.SecurityCenterManagementTransport] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Instantiates the security center management async client.

Parameters
NameDescription
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Union[str, .SecurityCenterManagementTransport]

The transport to use. If set to None, a transport is chosen automatically.

client_options Optional[Union[google.api_core.client_options.ClientOptions, dict]]

Custom options for the client. 1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
TypeDescription
google.auth.exceptions.MutualTlsChannelErrorIf mutual TLS transport creation failed for any reason.

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns a fully-qualified project string.

create_event_threat_detection_custom_module

create_event_threat_detection_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.CreateEventThreatDetectionCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    event_threat_detection_custom_module: typing.Optional[
        google.cloud.securitycentermanagement_v1.types.security_center_management.EventThreatDetectionCustomModule
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.EventThreatDetectionCustomModule
)

Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_create_event_threat_detection_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.CreateEventThreatDetectionCustomModuleRequest(
        parent="parent_value",
    )

    # Make the request
    response = await client.create_event_threat_detection_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.CreateEventThreatDetectionCustomModuleRequest, dict]]

The request object. Message for creating a EventThreatDetectionCustomModule

parent str

Required. Name of parent for the module. Its format is "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

event_threat_detection_custom_module EventThreatDetectionCustomModule

Required. The module to create. The event_threat_detection_custom_module.name will be ignored and server generated. This corresponds to the event_threat_detection_custom_module field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.EventThreatDetectionCustomModuleAn event threat detection custom module is a Cloud SCC resource that contains the configuration and enablement state of a custom module, which enables ETD to write certain findings to Cloud SCC.

create_security_health_analytics_custom_module

create_security_health_analytics_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.CreateSecurityHealthAnalyticsCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    security_health_analytics_custom_module: typing.Optional[
        google.cloud.securitycentermanagement_v1.types.security_center_management.SecurityHealthAnalyticsCustomModule
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.SecurityHealthAnalyticsCustomModule
)

Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_create_security_health_analytics_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.CreateSecurityHealthAnalyticsCustomModuleRequest(
        parent="parent_value",
    )

    # Make the request
    response = await client.create_security_health_analytics_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.CreateSecurityHealthAnalyticsCustomModuleRequest, dict]]

The request object. Message for creating a SecurityHealthAnalyticsCustomModule

parent str

Required. Name of the parent for the module. Its format is "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

security_health_analytics_custom_module SecurityHealthAnalyticsCustomModule

Required. The resource being created This corresponds to the security_health_analytics_custom_module field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.SecurityHealthAnalyticsCustomModuleRepresents an instance of a Security Health Analytics custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by the child folders and projects.

delete_event_threat_detection_custom_module

delete_event_threat_detection_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.DeleteEventThreatDetectionCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_delete_event_threat_detection_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.DeleteEventThreatDetectionCustomModuleRequest(
        name="name_value",
    )

    # Make the request
    await client.delete_event_threat_detection_custom_module(request=request)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.DeleteEventThreatDetectionCustomModuleRequest, dict]]

The request object. Message for deleting a EventThreatDetectionCustomModule

name str

Required. The resource name of the ETD custom module. Its format is: - "organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}". - "folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}". - "projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}". This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

delete_security_health_analytics_custom_module

delete_security_health_analytics_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.DeleteSecurityHealthAnalyticsCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_delete_security_health_analytics_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(
        name="name_value",
    )

    # Make the request
    await client.delete_security_health_analytics_custom_module(request=request)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.DeleteSecurityHealthAnalyticsCustomModuleRequest, dict]]

The request object. Message for deleting a SecurityHealthAnalyticsCustomModule

name str

Required. The resource name of the SHA custom module. Its format is: - "organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}". - "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}". - "projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}". This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

effective_event_threat_detection_custom_module_path

effective_event_threat_detection_custom_module_path(
    organization: str,
    location: str,
    effective_event_threat_detection_custom_module: str,
) -> str

Returns a fully-qualified effective_event_threat_detection_custom_module string.

effective_security_health_analytics_custom_module_path

effective_security_health_analytics_custom_module_path(
    organization: str,
    location: str,
    effective_security_health_analytics_custom_module: str,
) -> str

Returns a fully-qualified effective_security_health_analytics_custom_module string.

event_threat_detection_custom_module_path

event_threat_detection_custom_module_path(
    organization: str, location: str, event_threat_detection_custom_module: str
) -> str

Returns a fully-qualified event_threat_detection_custom_module string.

finding_path

finding_path(organization: str, source: str, finding: str) -> str

Returns a fully-qualified finding string.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
SecurityCenterManagementAsyncClientThe constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameter
NameDescription
info dict

The service account private key info.

Returns
TypeDescription
SecurityCenterManagementAsyncClientThe constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
SecurityCenterManagementAsyncClientThe constructed client.

get_effective_event_threat_detection_custom_module

get_effective_event_threat_detection_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.GetEffectiveEventThreatDetectionCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.EffectiveEventThreatDetectionCustomModule
)

Gets an effective ETD custom module. Retrieves the effective module at the given level. The difference between an EffectiveCustomModule and a CustomModule is that the fields for an EffectiveCustomModule are computed from ancestors if needed. For example, the enablement_state for a CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the enablement_state for an EffectiveCustomModule is always computed to ENABLED or DISABLED (the effective enablement_state).

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_get_effective_event_threat_detection_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.GetEffectiveEventThreatDetectionCustomModuleRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_effective_event_threat_detection_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.GetEffectiveEventThreatDetectionCustomModuleRequest, dict]]

The request object. Message for getting a EffectiveEventThreatDetectionCustomModule

name str

Required. The resource name of the ETD custom module. Its format is: - "organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}". - "folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}". - "projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}". This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.EffectiveEventThreatDetectionCustomModuleAn EffectiveEventThreatDetectionCustomModule is the representation of EventThreatDetectionCustomModule at a given level taking hierarchy into account and resolving various fields accordingly. e.g. if the module is enabled at the ancestor level, effective modules at all descendant levels will have enablement_state set to ENABLED. Similarly, if module.inherited is set, then effective module's config will contain the ancestor's config details. EffectiveEventThreatDetectionCustomModule is read-only.

get_effective_security_health_analytics_custom_module

get_effective_security_health_analytics_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.EffectiveSecurityHealthAnalyticsCustomModule
)

Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_get_effective_security_health_analytics_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_effective_security_health_analytics_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, dict]]

The request object. Message for getting a EffectiveSecurityHealthAnalyticsCustomModule

name str

Required. The resource name of the SHA custom module. Its format is: - "organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{module_id}". - "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{module_id}". - "projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{module_id}". This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.EffectiveSecurityHealthAnalyticsCustomModuleAn EffectiveSecurityHealthAnalyticsCustomModule is the representation of a Security Health Analytics custom module at a specified level of the resource hierarchy: organization, folder, or project. If a custom module is inherited from a parent organization or folder, the value of the enablementState property in EffectiveSecurityHealthAnalyticsCustomModule is set to the value that is effective in the parent, instead of INHERITED. For example, if the module is enabled in a parent organization or folder, the effective enablement_state for the module in all child folders or projects is also enabled. EffectiveSecurityHealthAnalyticsCustomModule is read-only.

get_event_threat_detection_custom_module

get_event_threat_detection_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.GetEventThreatDetectionCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.EventThreatDetectionCustomModule
)

Gets an Event Threat Detection custom module.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_get_event_threat_detection_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.GetEventThreatDetectionCustomModuleRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_event_threat_detection_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.GetEventThreatDetectionCustomModuleRequest, dict]]

The request object. Message for getting a EventThreatDetectionCustomModule

name str

Required. The resource name of the ETD custom module. Its format is: - "organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}". - "folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}". - "projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}". This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.EventThreatDetectionCustomModuleAn event threat detection custom module is a Cloud SCC resource that contains the configuration and enablement state of a custom module, which enables ETD to write certain findings to Cloud SCC.

get_location

get_location(
    request: typing.Optional[
        google.cloud.location.locations_pb2.GetLocationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.Location

Gets information about a location.

Parameters
NameDescription
request .location_pb2.GetLocationRequest

The request object. Request message for GetLocation method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.location_pb2.LocationLocation object.

get_mtls_endpoint_and_cert_source

get_mtls_endpoint_and_cert_source(
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
)

Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameter
NameDescription
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf any errors happen.
Returns
TypeDescription
Tuple[str, Callable[[], Tuple[bytes, bytes]]]returns the API endpoint and the client cert source to use.

get_security_health_analytics_custom_module

get_security_health_analytics_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.GetSecurityHealthAnalyticsCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.SecurityHealthAnalyticsCustomModule
)

Retrieves a SecurityHealthAnalyticsCustomModule.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_get_security_health_analytics_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.GetSecurityHealthAnalyticsCustomModuleRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_security_health_analytics_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.GetSecurityHealthAnalyticsCustomModuleRequest, dict]]

The request object. Message for getting a SecurityHealthAnalyticsCustomModule

name str

Required. Name of the resource This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.SecurityHealthAnalyticsCustomModuleRepresents an instance of a Security Health Analytics custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by the child folders and projects.

get_transport_class

get_transport_class() -> (
    typing.Type[
        google.cloud.securitycentermanagement_v1.services.security_center_management.transports.base.SecurityCenterManagementTransport
    ]
)

Returns an appropriate transport class.

Parameter
NameDescription
label typing.Optional[str]

The name of the desired transport. If none is provided, then the first transport in the registry is used.

list_descendant_event_threat_detection_custom_modules

list_descendant_event_threat_detection_custom_modules(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.ListDescendantEventThreatDetectionCustomModulesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListDescendantEventThreatDetectionCustomModulesAsyncPager
)

Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_list_descendant_event_threat_detection_custom_modules():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.ListDescendantEventThreatDetectionCustomModulesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_descendant_event_threat_detection_custom_modules(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.ListDescendantEventThreatDetectionCustomModulesRequest, dict]]

The request object. Request message for listing descendant Event Threat Detection custom modules.

parent str

Required. Name of parent to list custom modules. Its format is "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListDescendantEventThreatDetectionCustomModulesAsyncPagerResponse message for listing descendant Event Threat Detection custom modules. Iterating over this object will yield results and resolve additional pages automatically.

list_descendant_security_health_analytics_custom_modules

list_descendant_security_health_analytics_custom_modules(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.ListDescendantSecurityHealthAnalyticsCustomModulesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListDescendantSecurityHealthAnalyticsCustomModulesAsyncPager
)

Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent's CRM descendants.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_list_descendant_security_health_analytics_custom_modules():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_descendant_security_health_analytics_custom_modules(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, dict]]

The request object. Request message for listing descendant Security Health Analytics custom modules.

parent str

Required. Name of parent to list custom modules. Its format is "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListDescendantSecurityHealthAnalyticsCustomModulesAsyncPagerResponse message for listing descendant Security Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages automatically.

list_effective_event_threat_detection_custom_modules

list_effective_event_threat_detection_custom_modules(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.ListEffectiveEventThreatDetectionCustomModulesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListEffectiveEventThreatDetectionCustomModulesAsyncPager
)

Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_list_effective_event_threat_detection_custom_modules():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.ListEffectiveEventThreatDetectionCustomModulesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_effective_event_threat_detection_custom_modules(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.ListEffectiveEventThreatDetectionCustomModulesRequest, dict]]

The request object. Request message for listing effective Event Threat Detection custom modules.

parent str

Required. Name of parent to list effective custom modules. Its format is "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListEffectiveEventThreatDetectionCustomModulesAsyncPagerResponse message for listing effective Event Threat Detection custom modules. Iterating over this object will yield results and resolve additional pages automatically.

list_effective_security_health_analytics_custom_modules

list_effective_security_health_analytics_custom_modules(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListEffectiveSecurityHealthAnalyticsCustomModulesAsyncPager
)

Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors (no descendants).

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_list_effective_security_health_analytics_custom_modules():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_effective_security_health_analytics_custom_modules(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, dict]]

The request object. Request message for listing effective Security Health Analytics custom modules.

parent str

Required. Name of parent to list effective custom modules. Its format is "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListEffectiveSecurityHealthAnalyticsCustomModulesAsyncPagerResponse message for listing effective Security Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages automatically.

list_event_threat_detection_custom_modules

list_event_threat_detection_custom_modules(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.ListEventThreatDetectionCustomModulesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListEventThreatDetectionCustomModulesAsyncPager
)

Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_list_event_threat_detection_custom_modules():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.ListEventThreatDetectionCustomModulesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_event_threat_detection_custom_modules(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.ListEventThreatDetectionCustomModulesRequest, dict]]

The request object. Request message for listing Event Threat Detection custom modules.

parent str

Required. Name of parent to list custom modules. Its format is "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListEventThreatDetectionCustomModulesAsyncPagerResponse message for listing Event Threat Detection custom modules. Iterating over this object will yield results and resolve additional pages automatically.

list_locations

list_locations(
    request: typing.Optional[
        google.cloud.location.locations_pb2.ListLocationsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse

Lists information about the supported locations for this service.

Parameters
NameDescription
request .location_pb2.ListLocationsRequest

The request object. Request message for ListLocations method.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.location_pb2.ListLocationsResponseResponse message for ListLocations method.

list_security_health_analytics_custom_modules

list_security_health_analytics_custom_modules(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.ListSecurityHealthAnalyticsCustomModulesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListSecurityHealthAnalyticsCustomModulesAsyncPager
)

Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors (no descendants).

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_list_security_health_analytics_custom_modules():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.ListSecurityHealthAnalyticsCustomModulesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_security_health_analytics_custom_modules(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.ListSecurityHealthAnalyticsCustomModulesRequest, dict]]

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 "organizations/{organization}/locations/{location}", "folders/{folder}/locations/{location}", or "projects/{project}/locations/{location}" This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.services.security_center_management.pagers.ListSecurityHealthAnalyticsCustomModulesAsyncPagerResponse message for listing Security Health Analytics custom modules. Iterating over this object will yield results and resolve additional pages automatically.

parse_common_billing_account_path

parse_common_billing_account_path(path: str) -> typing.Dict[str, str]

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str) -> typing.Dict[str, str]

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str) -> typing.Dict[str, str]

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str) -> typing.Dict[str, str]

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str) -> typing.Dict[str, str]

Parse a project path into its component segments.

parse_effective_event_threat_detection_custom_module_path

parse_effective_event_threat_detection_custom_module_path(
    path: str,
) -> typing.Dict[str, str]

Parses a effective_event_threat_detection_custom_module path into its component segments.

parse_effective_security_health_analytics_custom_module_path

parse_effective_security_health_analytics_custom_module_path(
    path: str,
) -> typing.Dict[str, str]

Parses a effective_security_health_analytics_custom_module path into its component segments.

parse_event_threat_detection_custom_module_path

parse_event_threat_detection_custom_module_path(path: str) -> typing.Dict[str, str]

Parses a event_threat_detection_custom_module path into its component segments.

parse_finding_path

parse_finding_path(path: str) -> typing.Dict[str, str]

Parses a finding path into its component segments.

parse_security_health_analytics_custom_module_path

parse_security_health_analytics_custom_module_path(
    path: str,
) -> typing.Dict[str, str]

Parses a security_health_analytics_custom_module path into its component segments.

security_health_analytics_custom_module_path

security_health_analytics_custom_module_path(
    organization: str, location: str, security_health_analytics_custom_module: str
) -> str

Returns a fully-qualified security_health_analytics_custom_module string.

simulate_security_health_analytics_custom_module

simulate_security_health_analytics_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.SimulateSecurityHealthAnalyticsCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    custom_config: typing.Optional[
        google.cloud.securitycentermanagement_v1.types.security_center_management.CustomConfig
    ] = None,
    resource: typing.Optional[
        google.cloud.securitycentermanagement_v1.types.security_center_management.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.SimulateSecurityHealthAnalyticsCustomModuleResponse
)

Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_simulate_security_health_analytics_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    resource = securitycentermanagement_v1.SimulatedResource()
    resource.resource_type = "resource_type_value"

    request = securitycentermanagement_v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(
        parent="parent_value",
        resource=resource,
    )

    # Make the request
    response = await client.simulate_security_health_analytics_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.SimulateSecurityHealthAnalyticsCustomModuleRequest, dict]]

The request object. Request message to simulate a CustomConfig against a given test resource. Maximum size of the request is 4 MB by default.

parent str

Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see Relative Resource Name https://cloud.google.com/apis/design/resource_names#relative_resource_name__ Example: organizations/{organization_id}. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

custom_config CustomConfig

Required. The custom configuration that you need to test. This corresponds to the custom_config field on the request instance; if request is provided, this should not be set.

resource SimulatedResource

Required. Resource data to simulate custom module against. This corresponds to the resource field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.SimulateSecurityHealthAnalyticsCustomModuleResponseResponse message for simulating a SecurityHealthAnalyticsCustomModule against a given resource.

update_event_threat_detection_custom_module

update_event_threat_detection_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.UpdateEventThreatDetectionCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    event_threat_detection_custom_module: typing.Optional[
        google.cloud.securitycentermanagement_v1.types.security_center_management.EventThreatDetectionCustomModule
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.EventThreatDetectionCustomModule
)

Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_update_event_threat_detection_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.UpdateEventThreatDetectionCustomModuleRequest(
    )

    # Make the request
    response = await client.update_event_threat_detection_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.UpdateEventThreatDetectionCustomModuleRequest, dict]]

The request object. Message for updating a EventThreatDetectionCustomModule

event_threat_detection_custom_module EventThreatDetectionCustomModule

Required. The module being updated This corresponds to the event_threat_detection_custom_module field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten in the EventThreatDetectionCustomModule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.EventThreatDetectionCustomModuleAn event threat detection custom module is a Cloud SCC resource that contains the configuration and enablement state of a custom module, which enables ETD to write certain findings to Cloud SCC.

update_security_health_analytics_custom_module

update_security_health_analytics_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.UpdateSecurityHealthAnalyticsCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    security_health_analytics_custom_module: typing.Optional[
        google.cloud.securitycentermanagement_v1.types.security_center_management.SecurityHealthAnalyticsCustomModule
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.SecurityHealthAnalyticsCustomModule
)

Updates the SecurityHealthAnalyticsCustomModule under 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 display name and custom config of a module is supported on resident modules only.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_update_security_health_analytics_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(
    )

    # Make the request
    response = await client.update_security_health_analytics_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.UpdateSecurityHealthAnalyticsCustomModuleRequest, dict]]

The request object. Message for updating a SecurityHealthAnalyticsCustomModule

security_health_analytics_custom_module SecurityHealthAnalyticsCustomModule

Required. The resource being updated This corresponds to the security_health_analytics_custom_module field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. The list of fields to be updated. The only fields that can be updated are enablement_state and custom_config. If empty or set to the wildcard value *, both enablement_state and custom_config are updated. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.SecurityHealthAnalyticsCustomModuleRepresents an instance of a Security Health Analytics custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by the child folders and projects.

validate_event_threat_detection_custom_module

validate_event_threat_detection_custom_module(
    request: typing.Optional[
        typing.Union[
            google.cloud.securitycentermanagement_v1.types.security_center_management.ValidateEventThreatDetectionCustomModuleRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary_async.AsyncRetry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.securitycentermanagement_v1.types.security_center_management.ValidateEventThreatDetectionCustomModuleResponse
)

Validates the given Event Threat Detection custom module.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securitycentermanagement_v1

async def sample_validate_event_threat_detection_custom_module():
    # Create a client
    client = securitycentermanagement_v1.SecurityCenterManagementAsyncClient()

    # Initialize request argument(s)
    request = securitycentermanagement_v1.ValidateEventThreatDetectionCustomModuleRequest(
        parent="parent_value",
        raw_text="raw_text_value",
        type_="type__value",
    )

    # Make the request
    response = await client.validate_event_threat_detection_custom_module(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Optional[Union[google.cloud.securitycentermanagement_v1.types.ValidateEventThreatDetectionCustomModuleRequest, dict]]

The request object. Request to validate an Event Threat Detection custom module.

retry google.api_core.retry_async.AsyncRetry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.securitycentermanagement_v1.types.ValidateEventThreatDetectionCustomModuleResponseResponse to validating an Event Threat Detection custom module.