Reference documentation and code samples for the Google Cloud Security Center Management V1 Client class SecurityCenterManagementClient.
Service Description: Service describing handlers for resources
This class provides the ability to make remote calls to the backing service through method calls that map to API methods.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.
Namespace
Google \ Cloud \ SecurityCenterManagement \ V1 \ ClientMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
options |
array
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() . |
↳ disableRetries |
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to |
↳ clientConfig |
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
↳ transport |
string|TransportInterface
The transport used for executing network requests. May be either the string |
↳ transportConfig |
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options. |
↳ clientCertSource |
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
createEventThreatDetectionCustomModule
Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.
The async variant is SecurityCenterManagementClient::createEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\CreateEventThreatDetectionCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\CreateEventThreatDetectionCustomModuleRequest;
use Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule;
/**
* @param string $formattedParent Name of parent for the module, in one of the following formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function create_event_threat_detection_custom_module_sample(string $formattedParent): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule();
$request = (new CreateEventThreatDetectionCustomModuleRequest())
->setParent($formattedParent)
->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule);
// Call the API and handle any network failures.
try {
/** @var EventThreatDetectionCustomModule $response */
$response = $securityCenterManagementClient->createEventThreatDetectionCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
create_event_threat_detection_custom_module_sample($formattedParent);
}
createSecurityHealthAnalyticsCustomModule
Creates a resident
SecurityHealthAnalyticsCustomModule
at the scope of the given organization, folder, or project, and also
creates inherited SecurityHealthAnalyticsCustomModule
resources for all
folders and projects that are descendants of the given parent. These
modules are enabled by default.
The async variant is SecurityCenterManagementClient::createSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\CreateSecurityHealthAnalyticsCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\CreateSecurityHealthAnalyticsCustomModuleRequest;
use Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedParent Name of the parent organization, folder, or project of the
* module, in one of the following formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function create_security_health_analytics_custom_module_sample(string $formattedParent): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule();
$request = (new CreateSecurityHealthAnalyticsCustomModuleRequest())
->setParent($formattedParent)
->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule);
// Call the API and handle any network failures.
try {
/** @var SecurityHealthAnalyticsCustomModule $response */
$response = $securityCenterManagementClient->createSecurityHealthAnalyticsCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
create_security_health_analytics_custom_module_sample($formattedParent);
}
deleteEventThreatDetectionCustomModule
Deletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.
The async variant is SecurityCenterManagementClient::deleteEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\DeleteEventThreatDetectionCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\DeleteEventThreatDetectionCustomModuleRequest;
/**
* @param string $formattedName The resource name of the Event Threat Detection custom module, in
* one of the following formats:
*
* * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
* * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
* * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
* Please see {@see SecurityCenterManagementClient::eventThreatDetectionCustomModuleName()} for help formatting this field.
*/
function delete_event_threat_detection_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new DeleteEventThreatDetectionCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterManagementClient->deleteEventThreatDetectionCustomModule($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SecurityCenterManagementClient::eventThreatDetectionCustomModuleName(
'[ORGANIZATION]',
'[LOCATION]',
'[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'
);
delete_event_threat_detection_custom_module_sample($formattedName);
}
deleteSecurityHealthAnalyticsCustomModule
Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.
The async variant is SecurityCenterManagementClient::deleteSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\DeleteSecurityHealthAnalyticsCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\DeleteSecurityHealthAnalyticsCustomModuleRequest;
/**
* @param string $formattedName The resource name of the SHA custom module, in one of the
* following formats:
*
* * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`
* * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`
* * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`
* Please see {@see SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field.
*/
function delete_security_health_analytics_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new DeleteSecurityHealthAnalyticsCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterManagementClient->deleteSecurityHealthAnalyticsCustomModule($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName(
'[ORGANIZATION]',
'[LOCATION]',
'[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'
);
delete_security_health_analytics_custom_module_sample($formattedName);
}
getEffectiveEventThreatDetectionCustomModule
Gets the effective Event Threat Detection custom module at the given level.
The difference between an
EffectiveEventThreatDetectionCustomModule
and an
EventThreatDetectionCustomModule
is that the fields for an EffectiveEventThreatDetectionCustomModule
are
computed from ancestors if needed. For example, the enablement state for an
EventThreatDetectionCustomModule
can be ENABLED
, DISABLED
, or
INHERITED
. In contrast, the enablement state for an
EffectiveEventThreatDetectionCustomModule
is always computed as ENABLED
or DISABLED
.
The async variant is SecurityCenterManagementClient::getEffectiveEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetEffectiveEventThreatDetectionCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\GetEffectiveEventThreatDetectionCustomModuleRequest;
/**
* @param string $formattedName The resource name of the Event Threat Detection custom module, in
* one of the following formats:
*
* * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
* * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
* * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
* Please see {@see SecurityCenterManagementClient::effectiveEventThreatDetectionCustomModuleName()} for help formatting this field.
*/
function get_effective_event_threat_detection_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new GetEffectiveEventThreatDetectionCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EffectiveEventThreatDetectionCustomModule $response */
$response = $securityCenterManagementClient->getEffectiveEventThreatDetectionCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SecurityCenterManagementClient::effectiveEventThreatDetectionCustomModuleName(
'[ORGANIZATION]',
'[LOCATION]',
'[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]'
);
get_effective_event_threat_detection_custom_module_sample($formattedName);
}
getEffectiveSecurityHealthAnalyticsCustomModule
Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule.
The async variant is SecurityCenterManagementClient::getEffectiveSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetEffectiveSecurityHealthAnalyticsCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\GetEffectiveSecurityHealthAnalyticsCustomModuleRequest;
/**
* @param string $formattedName The full resource name of the custom module, specified in one of
* the following formats:
*
* * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
* * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
* * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
* Please see {@see SecurityCenterManagementClient::effectiveSecurityHealthAnalyticsCustomModuleName()} for help formatting this field.
*/
function get_effective_security_health_analytics_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EffectiveSecurityHealthAnalyticsCustomModule $response */
$response = $securityCenterManagementClient->getEffectiveSecurityHealthAnalyticsCustomModule(
$request
);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SecurityCenterManagementClient::effectiveSecurityHealthAnalyticsCustomModuleName(
'[ORGANIZATION]',
'[LOCATION]',
'[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'
);
get_effective_security_health_analytics_custom_module_sample($formattedName);
}
getEventThreatDetectionCustomModule
Gets an Event Threat Detection custom module.
The async variant is SecurityCenterManagementClient::getEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetEventThreatDetectionCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\GetEventThreatDetectionCustomModuleRequest;
/**
* @param string $formattedName The resource name of the Event Threat Detection custom module, in
* one of the following formats:
*
* * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
* * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
* * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
* Please see {@see SecurityCenterManagementClient::eventThreatDetectionCustomModuleName()} for help formatting this field.
*/
function get_event_threat_detection_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new GetEventThreatDetectionCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EventThreatDetectionCustomModule $response */
$response = $securityCenterManagementClient->getEventThreatDetectionCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SecurityCenterManagementClient::eventThreatDetectionCustomModuleName(
'[ORGANIZATION]',
'[LOCATION]',
'[EVENT_THREAT_DETECTION_CUSTOM_MODULE]'
);
get_event_threat_detection_custom_module_sample($formattedName);
}
getSecurityCenterService
Gets service settings for the specified Security Command Center service.
The async variant is SecurityCenterManagementClient::getSecurityCenterServiceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetSecurityCenterServiceRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\GetSecurityCenterServiceRequest;
use Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService;
/**
* @param string $formattedName The Security Command Center service to retrieve, in one of the
* following formats:
*
* * organizations/{organization}/locations/{location}/securityCenterServices/{service}
* * folders/{folder}/locations/{location}/securityCenterServices/{service}
* * projects/{project}/locations/{location}/securityCenterServices/{service}
*
* The following values are valid for `{service}`:
*
* * `container-threat-detection`
* * `event-threat-detection`
* * `security-health-analytics`
* * `vm-threat-detection`
* * `web-security-scanner`
* Please see {@see SecurityCenterManagementClient::securityCenterServiceName()} for help formatting this field.
*/
function get_security_center_service_sample(string $formattedName): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new GetSecurityCenterServiceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var SecurityCenterService $response */
$response = $securityCenterManagementClient->getSecurityCenterService($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SecurityCenterManagementClient::securityCenterServiceName(
'[PROJECT]',
'[LOCATION]',
'[SERVICE]'
);
get_security_center_service_sample($formattedName);
}
getSecurityHealthAnalyticsCustomModule
Retrieves a SecurityHealthAnalyticsCustomModule.
The async variant is SecurityCenterManagementClient::getSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetSecurityHealthAnalyticsCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\GetSecurityHealthAnalyticsCustomModuleRequest;
use Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedName Name of the resource, in the format
* `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. Please see
* {@see SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field.
*/
function get_security_health_analytics_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new GetSecurityHealthAnalyticsCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var SecurityHealthAnalyticsCustomModule $response */
$response = $securityCenterManagementClient->getSecurityHealthAnalyticsCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SecurityCenterManagementClient::securityHealthAnalyticsCustomModuleName(
'[ORGANIZATION]',
'[LOCATION]',
'[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]'
);
get_security_health_analytics_custom_module_sample($formattedName);
}
listDescendantEventThreatDetectionCustomModules
Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.
The async variant is SecurityCenterManagementClient::listDescendantEventThreatDetectionCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListDescendantEventThreatDetectionCustomModulesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\ListDescendantEventThreatDetectionCustomModulesRequest;
/**
* @param string $formattedParent Name of parent to list custom modules, in one of the following
* formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function list_descendant_event_threat_detection_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ListDescendantEventThreatDetectionCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listDescendantEventThreatDetectionCustomModules(
$request
);
/** @var EventThreatDetectionCustomModule $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
list_descendant_event_threat_detection_custom_modules_sample($formattedParent);
}
listDescendantSecurityHealthAnalyticsCustomModules
Returns a list of all resident SecurityHealthAnalyticsCustomModule resources under the given organization, folder, or project and all of its descendants.
The async variant is SecurityCenterManagementClient::listDescendantSecurityHealthAnalyticsCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListDescendantSecurityHealthAnalyticsCustomModulesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\ListDescendantSecurityHealthAnalyticsCustomModulesRequest;
use Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedParent Name of the parent organization, folder, or project in which to
* list custom modules, in one of the following formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function list_descendant_security_health_analytics_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ListDescendantSecurityHealthAnalyticsCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listDescendantSecurityHealthAnalyticsCustomModules(
$request
);
/** @var SecurityHealthAnalyticsCustomModule $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
list_descendant_security_health_analytics_custom_modules_sample($formattedParent);
}
listEffectiveEventThreatDetectionCustomModules
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.
The async variant is SecurityCenterManagementClient::listEffectiveEventThreatDetectionCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListEffectiveEventThreatDetectionCustomModulesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\ListEffectiveEventThreatDetectionCustomModulesRequest;
/**
* @param string $formattedParent Name of parent to list effective custom modules, in one of the
* following formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function list_effective_event_threat_detection_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ListEffectiveEventThreatDetectionCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listEffectiveEventThreatDetectionCustomModules(
$request
);
/** @var EffectiveEventThreatDetectionCustomModule $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
list_effective_event_threat_detection_custom_modules_sample($formattedParent);
}
listEffectiveSecurityHealthAnalyticsCustomModules
Returns a list of all EffectiveSecurityHealthAnalyticsCustomModule resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).
The async variant is SecurityCenterManagementClient::listEffectiveSecurityHealthAnalyticsCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesRequest;
/**
* @param string $formattedParent Name of parent to list effective custom modules, in one of the
* following formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function list_effective_security_health_analytics_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listEffectiveSecurityHealthAnalyticsCustomModules(
$request
);
/** @var EffectiveSecurityHealthAnalyticsCustomModule $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
list_effective_security_health_analytics_custom_modules_sample($formattedParent);
}
listEventThreatDetectionCustomModules
Lists all Event Threat Detection custom modules for the given organization, folder, or project. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.
The async variant is SecurityCenterManagementClient::listEventThreatDetectionCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListEventThreatDetectionCustomModulesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\ListEventThreatDetectionCustomModulesRequest;
/**
* @param string $formattedParent Name of parent to list custom modules, in one of the following
* formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function list_event_threat_detection_custom_modules_sample(string $formattedParent): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ListEventThreatDetectionCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listEventThreatDetectionCustomModules($request);
/** @var EventThreatDetectionCustomModule $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
list_event_threat_detection_custom_modules_sample($formattedParent);
}
listSecurityCenterServices
Returns a list of all Security Command Center services for the given parent.
The async variant is SecurityCenterManagementClient::listSecurityCenterServicesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListSecurityCenterServicesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\ListSecurityCenterServicesRequest;
use Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService;
/**
* @param string $formattedParent The name of the parent to list Security Command Center services,
* in one of the following formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function list_security_center_services_sample(string $formattedParent): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ListSecurityCenterServicesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listSecurityCenterServices($request);
/** @var SecurityCenterService $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
list_security_center_services_sample($formattedParent);
}
listSecurityHealthAnalyticsCustomModules
Returns a list of all SecurityHealthAnalyticsCustomModule resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).
The async variant is SecurityCenterManagementClient::listSecurityHealthAnalyticsCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListSecurityHealthAnalyticsCustomModulesRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\ListSecurityHealthAnalyticsCustomModulesRequest;
use Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedParent Name of the parent organization, folder, or project in which to
* list custom modules, in one of the following formats:
*
* * `organizations/{organization}/locations/{location}`
* * `folders/{folder}/locations/{location}`
* * `projects/{project}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
*/
function list_security_health_analytics_custom_modules_sample(string $formattedParent): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ListSecurityHealthAnalyticsCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listSecurityHealthAnalyticsCustomModules($request);
/** @var SecurityHealthAnalyticsCustomModule $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
list_security_health_analytics_custom_modules_sample($formattedParent);
}
simulateSecurityHealthAnalyticsCustomModule
Simulates the result of using a SecurityHealthAnalyticsCustomModule to check a resource.
The async variant is SecurityCenterManagementClient::simulateSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\CustomConfig;
use Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest;
use Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource;
use Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse;
/**
* @param string $parent The relative resource name of the organization, project, or
* folder. For more information about relative resource names, see [AIP-122:
* Resource names](https://google.aip.dev/122). Example:
* `organizations/{organization_id}`.
* @param string $resourceResourceType The type of the resource. For example,
* `compute.googleapis.com/Disk`.
*/
function simulate_security_health_analytics_custom_module_sample(
string $parent,
string $resourceResourceType
): void {
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$customConfig = new CustomConfig();
$resource = (new SimulatedResource())
->setResourceType($resourceResourceType);
$request = (new SimulateSecurityHealthAnalyticsCustomModuleRequest())
->setParent($parent)
->setCustomConfig($customConfig)
->setResource($resource);
// Call the API and handle any network failures.
try {
/** @var SimulateSecurityHealthAnalyticsCustomModuleResponse $response */
$response = $securityCenterManagementClient->simulateSecurityHealthAnalyticsCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$parent = '[PARENT]';
$resourceResourceType = '[RESOURCE_TYPE]';
simulate_security_health_analytics_custom_module_sample($parent, $resourceResourceType);
}
updateEventThreatDetectionCustomModule
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.
The async variant is SecurityCenterManagementClient::updateEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\UpdateEventThreatDetectionCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\UpdateEventThreatDetectionCustomModuleRequest;
use Google\Protobuf\FieldMask;
/**
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function update_event_threat_detection_custom_module_sample(): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$updateMask = new FieldMask();
$eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule();
$request = (new UpdateEventThreatDetectionCustomModuleRequest())
->setUpdateMask($updateMask)
->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule);
// Call the API and handle any network failures.
try {
/** @var EventThreatDetectionCustomModule $response */
$response = $securityCenterManagementClient->updateEventThreatDetectionCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateSecurityCenterService
Updates a Security Command Center service using the given update mask.
The async variant is SecurityCenterManagementClient::updateSecurityCenterServiceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityCenterServiceRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService;
use Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityCenterServiceRequest;
use Google\Protobuf\FieldMask;
/**
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function update_security_center_service_sample(): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$securityCenterService = new SecurityCenterService();
$updateMask = new FieldMask();
$request = (new UpdateSecurityCenterServiceRequest())
->setSecurityCenterService($securityCenterService)
->setUpdateMask($updateMask);
// Call the API and handle any network failures.
try {
/** @var SecurityCenterService $response */
$response = $securityCenterManagementClient->updateSecurityCenterService($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateSecurityHealthAnalyticsCustomModule
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 configuration of a module is supported on resident modules only.
The async variant is SecurityCenterManagementClient::updateSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityHealthAnalyticsCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule;
use Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityHealthAnalyticsCustomModuleRequest;
use Google\Protobuf\FieldMask;
/**
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function update_security_health_analytics_custom_module_sample(): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$updateMask = new FieldMask();
$securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule();
$request = (new UpdateSecurityHealthAnalyticsCustomModuleRequest())
->setUpdateMask($updateMask)
->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule);
// Call the API and handle any network failures.
try {
/** @var SecurityHealthAnalyticsCustomModule $response */
$response = $securityCenterManagementClient->updateSecurityHealthAnalyticsCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
validateEventThreatDetectionCustomModule
Validates the given Event Threat Detection custom module.
The async variant is SecurityCenterManagementClient::validateEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
use Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleRequest;
use Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse;
/**
* @param string $formattedParent Resource name of the parent to validate the custom modules under,
* in one of the following formats:
*
* * `organizations/{organization}/locations/{location}`
* Please see {@see SecurityCenterManagementClient::organizationLocationName()} for help formatting this field.
* @param string $rawText The raw text of the module's contents. Used to generate error
* messages.
* @param string $type The type of the module. For example, `CONFIGURABLE_BAD_IP`.
*/
function validate_event_threat_detection_custom_module_sample(
string $formattedParent,
string $rawText,
string $type
): void {
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = (new ValidateEventThreatDetectionCustomModuleRequest())
->setParent($formattedParent)
->setRawText($rawText)
->setType($type);
// Call the API and handle any network failures.
try {
/** @var ValidateEventThreatDetectionCustomModuleResponse $response */
$response = $securityCenterManagementClient->validateEventThreatDetectionCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SecurityCenterManagementClient::organizationLocationName(
'[ORGANIZATION]',
'[LOCATION]'
);
$rawText = '[RAW_TEXT]';
$type = '[TYPE]';
validate_event_threat_detection_custom_module_sample($formattedParent, $rawText, $type);
}
getLocation
Gets information about a location.
The async variant is SecurityCenterManagementClient::getLocationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Location\Location |
use Google\ApiCore\ApiException;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
/**
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function get_location_sample(): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $securityCenterManagementClient->getLocation($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
listLocations
Lists information about the supported locations for this service.
The async variant is SecurityCenterManagementClient::listLocationsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\SecurityCenterManagement\V1\Client\SecurityCenterManagementClient;
/**
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function list_locations_sample(): void
{
// Create a client.
$securityCenterManagementClient = new SecurityCenterManagementClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterManagementClient->listLocations($request);
/** @var Location $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
createEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\CreateEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule> |
createSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\CreateSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule> |
deleteEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\DeleteEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
deleteSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\DeleteSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
getEffectiveEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetEffectiveEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\EffectiveEventThreatDetectionCustomModule> |
getEffectiveSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetEffectiveSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\EffectiveSecurityHealthAnalyticsCustomModule> |
getEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule> |
getSecurityCenterServiceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetSecurityCenterServiceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService> |
getSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\GetSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule> |
listDescendantEventThreatDetectionCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListDescendantEventThreatDetectionCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listDescendantSecurityHealthAnalyticsCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListDescendantSecurityHealthAnalyticsCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEffectiveEventThreatDetectionCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListEffectiveEventThreatDetectionCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEffectiveSecurityHealthAnalyticsCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEventThreatDetectionCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListEventThreatDetectionCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listSecurityCenterServicesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListSecurityCenterServicesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listSecurityHealthAnalyticsCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ListSecurityHealthAnalyticsCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
simulateSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse> |
updateEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\UpdateEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\EventThreatDetectionCustomModule> |
updateSecurityCenterServiceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityCenterServiceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\SecurityCenterService> |
updateSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\UpdateSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\SecurityHealthAnalyticsCustomModule> |
validateEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenterManagement\V1\ValidateEventThreatDetectionCustomModuleResponse> |
getLocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location> |
listLocationsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
static::effectiveEventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a effective_event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
effectiveEventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted effective_event_threat_detection_custom_module resource. |
static::effectiveSecurityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a effective_security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
effectiveSecurityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted effective_security_health_analytics_custom_module resource. |
static::eventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
eventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted event_threat_detection_custom_module resource. |
static::folderLocationName
Formats a string containing the fully-qualified path to represent a folder_location resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_location resource. |
static::folderLocationEffectiveEventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a folder_location_effective_event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
location |
string
|
effectiveEventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_location_effective_event_threat_detection_custom_module resource. |
static::folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a folder_location_effective_security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
location |
string
|
effectiveSecurityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_location_effective_security_health_analytics_custom_module resource. |
static::folderLocationEventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a folder_location_event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
location |
string
|
eventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_location_event_threat_detection_custom_module resource. |
static::folderLocationSecurityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a folder_location_security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
location |
string
|
securityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_location_security_health_analytics_custom_module resource. |
static::folderLocationServiceName
Formats a string containing the fully-qualified path to represent a folder_location_service resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
location |
string
|
service |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_location_service resource. |
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted location resource. |
static::organizationLocationName
Formats a string containing the fully-qualified path to represent a organization_location resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_location resource. |
static::organizationLocationEffectiveEventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a organization_location_effective_event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
effectiveEventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_location_effective_event_threat_detection_custom_module resource. |
static::organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a organization_location_effective_security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
effectiveSecurityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_location_effective_security_health_analytics_custom_module resource. |
static::organizationLocationEventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a organization_location_event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
eventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_location_event_threat_detection_custom_module resource. |
static::organizationLocationSecurityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a organization_location_security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
securityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_location_security_health_analytics_custom_module resource. |
static::organizationLocationServiceName
Formats a string containing the fully-qualified path to represent a organization_location_service resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
service |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_location_service resource. |
static::projectLocationEffectiveEventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a project_location_effective_event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
effectiveEventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_effective_event_threat_detection_custom_module resource. |
static::projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a project_location_effective_security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
effectiveSecurityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_effective_security_health_analytics_custom_module resource. |
static::projectLocationEventThreatDetectionCustomModuleName
Formats a string containing the fully-qualified path to represent a project_location_event_threat_detection_custom_module resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
eventThreatDetectionCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_event_threat_detection_custom_module resource. |
static::projectLocationSecurityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a project_location_security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
securityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_security_health_analytics_custom_module resource. |
static::projectLocationServiceName
Formats a string containing the fully-qualified path to represent a project_location_service resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
service |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_service resource. |
static::securityCenterServiceName
Formats a string containing the fully-qualified path to represent a security_center_service resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
service |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted security_center_service resource. |
static::securityHealthAnalyticsCustomModuleName
Formats a string containing the fully-qualified path to represent a security_health_analytics_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
securityHealthAnalyticsCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted security_health_analytics_custom_module resource. |
static::parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- effectiveEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}
- effectiveSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}
- eventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}
- folderLocation: folders/{folder}/locations/{location}
- folderLocationEffectiveEventThreatDetectionCustomModule: folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}
- folderLocationEffectiveSecurityHealthAnalyticsCustomModule: folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}
- folderLocationEventThreatDetectionCustomModule: folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}
- folderLocationSecurityHealthAnalyticsCustomModule: folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}
- folderLocationService: folders/{folder}/locations/{location}/securityCenterServices/{service}
- location: projects/{project}/locations/{location}
- organizationLocation: organizations/{organization}/locations/{location}
- organizationLocationEffectiveEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}
- organizationLocationEffectiveSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}
- organizationLocationEventThreatDetectionCustomModule: organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}
- organizationLocationSecurityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}
- organizationLocationService: organizations/{organization}/locations/{location}/securityCenterServices/{service}
- projectLocationEffectiveEventThreatDetectionCustomModule: projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}
- projectLocationEffectiveSecurityHealthAnalyticsCustomModule: projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}
- projectLocationEventThreatDetectionCustomModule: projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}
- projectLocationSecurityHealthAnalyticsCustomModule: projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}
- projectLocationService: projects/{project}/locations/{location}/securityCenterServices/{service}
- securityCenterService: projects/{project}/locations/{location}/securityCenterServices/{service}
- securityHealthAnalyticsCustomModule: organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
Parameters | |
---|---|
Name | Description |
formattedName |
string
The formatted name string |
template |
string
Optional name of template to match |
Returns | |
---|---|
Type | Description |
array |
An associative array from name component IDs to component values. |