Reference documentation and code samples for the Google Cloud Security Command Center V1 Client class SecurityCenterClient.
Service Description: V1 APIs for Security Center service.
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 \ SecurityCenter \ 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. |
batchCreateResourceValueConfigs
Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.
The async variant is SecurityCenterClient::batchCreateResourceValueConfigsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\BatchCreateResourceValueConfigsRequest
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\SecurityCenter\V1\BatchCreateResourceValueConfigsResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\BatchCreateResourceValueConfigsRequest;
use Google\Cloud\SecurityCenter\V1\BatchCreateResourceValueConfigsResponse;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateResourceValueConfigRequest;
use Google\Cloud\SecurityCenter\V1\ResourceValue;
use Google\Cloud\SecurityCenter\V1\ResourceValueConfig;
/**
* @param string $formattedParent Resource name of the new ResourceValueConfig's parent.
* The parent field in the CreateResourceValueConfigRequest
* messages must either be empty or match this field. Please see
* {@see SecurityCenterClient::organizationName()} for help formatting this field.
* @param string $formattedRequestsParent Resource name of the new ResourceValueConfig's parent. Please see
* {@see SecurityCenterClient::organizationName()} for help formatting this field.
* @param int $requestsResourceValueConfigResourceValue Resource value level this expression represents
* @param string $requestsResourceValueConfigTagValuesElement Tag values combined with `AND` to check against.
* Values in the form "tagValues/123"
* Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]`
* https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing
*/
function batch_create_resource_value_configs_sample(
string $formattedParent,
string $formattedRequestsParent,
int $requestsResourceValueConfigResourceValue,
string $requestsResourceValueConfigTagValuesElement
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$requestsResourceValueConfigTagValues = [$requestsResourceValueConfigTagValuesElement,];
$requestsResourceValueConfig = (new ResourceValueConfig())
->setResourceValue($requestsResourceValueConfigResourceValue)
->setTagValues($requestsResourceValueConfigTagValues);
$createResourceValueConfigRequest = (new CreateResourceValueConfigRequest())
->setParent($formattedRequestsParent)
->setResourceValueConfig($requestsResourceValueConfig);
$requests = [$createResourceValueConfigRequest,];
$request = (new BatchCreateResourceValueConfigsRequest())
->setParent($formattedParent)
->setRequests($requests);
// Call the API and handle any network failures.
try {
/** @var BatchCreateResourceValueConfigsResponse $response */
$response = $securityCenterClient->batchCreateResourceValueConfigs($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 = SecurityCenterClient::organizationName('[ORGANIZATION]');
$formattedRequestsParent = SecurityCenterClient::organizationName('[ORGANIZATION]');
$requestsResourceValueConfigResourceValue = ResourceValue::RESOURCE_VALUE_UNSPECIFIED;
$requestsResourceValueConfigTagValuesElement = '[TAG_VALUES]';
batch_create_resource_value_configs_sample(
$formattedParent,
$formattedRequestsParent,
$requestsResourceValueConfigResourceValue,
$requestsResourceValueConfigTagValuesElement
);
}
bulkMuteFindings
Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.
The async variant is SecurityCenterClient::bulkMuteFindingsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\BulkMuteFindingsRequest
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\OperationResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\SecurityCenter\V1\BulkMuteFindingsRequest;
use Google\Cloud\SecurityCenter\V1\BulkMuteFindingsResponse;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Rpc\Status;
/**
* @param string $parent The parent, at which bulk action needs to be applied. Its format
* is `organizations/[organization_id]`, `folders/[folder_id]`,
* `projects/[project_id]`.
*/
function bulk_mute_findings_sample(string $parent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new BulkMuteFindingsRequest())
->setParent($parent);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $securityCenterClient->bulkMuteFindings($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var BulkMuteFindingsResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->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]';
bulk_mute_findings_sample($parent);
}
createBigQueryExport
Creates a BigQuery export.
The async variant is SecurityCenterClient::createBigQueryExportAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateBigQueryExportRequest
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\SecurityCenter\V1\BigQueryExport |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\BigQueryExport;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateBigQueryExportRequest;
/**
* @param string $formattedParent The name of the parent resource of the new BigQuery export. Its
* format is `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::projectName()} for help formatting this field.
* @param string $bigQueryExportId Unique identifier provided by the client within the parent scope.
* It must consist of only lowercase letters, numbers, and hyphens, must start
* with a letter, must end with either a letter or a number, and must be 63
* characters or less.
*/
function create_big_query_export_sample(string $formattedParent, string $bigQueryExportId): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$bigQueryExport = new BigQueryExport();
$request = (new CreateBigQueryExportRequest())
->setParent($formattedParent)
->setBigQueryExport($bigQueryExport)
->setBigQueryExportId($bigQueryExportId);
// Call the API and handle any network failures.
try {
/** @var BigQueryExport $response */
$response = $securityCenterClient->createBigQueryExport($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 = SecurityCenterClient::projectName('[PROJECT]');
$bigQueryExportId = '[BIG_QUERY_EXPORT_ID]';
create_big_query_export_sample($formattedParent, $bigQueryExportId);
}
createEventThreatDetectionCustomModule
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.
The async variant is SecurityCenterClient::createEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\EventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateEventThreatDetectionCustomModuleRequest;
use Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule;
/**
* @param string $formattedParent The new custom module's parent.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings`.
* * `folders/{folder}/eventThreatDetectionSettings`.
* * `projects/{project}/eventThreatDetectionSettings`. Please see
* {@see SecurityCenterClient::eventThreatDetectionSettingsName()} for help formatting this field.
*/
function create_event_threat_detection_custom_module_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// 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 = $securityCenterClient->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 = SecurityCenterClient::eventThreatDetectionSettingsName('[ORGANIZATION]');
create_event_threat_detection_custom_module_sample($formattedParent);
}
createFinding
Creates a finding. The corresponding source must exist for finding creation to succeed.
The async variant is SecurityCenterClient::createFindingAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateFindingRequest
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\SecurityCenter\V1\Finding |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateFindingRequest;
use Google\Cloud\SecurityCenter\V1\Finding;
/**
* @param string $formattedParent Resource name of the new finding's parent. Its format should be
* `organizations/[organization_id]/sources/[source_id]`. Please see
* {@see SecurityCenterClient::sourceName()} for help formatting this field.
* @param string $findingId Unique identifier provided by the client within the parent scope.
* It must be alphanumeric and less than or equal to 32 characters and
* greater than 0 characters in length.
*/
function create_finding_sample(string $formattedParent, string $findingId): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$finding = new Finding();
$request = (new CreateFindingRequest())
->setParent($formattedParent)
->setFindingId($findingId)
->setFinding($finding);
// Call the API and handle any network failures.
try {
/** @var Finding $response */
$response = $securityCenterClient->createFinding($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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]');
$findingId = '[FINDING_ID]';
create_finding_sample($formattedParent, $findingId);
}
createMuteConfig
Creates a mute config.
The async variant is SecurityCenterClient::createMuteConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateMuteConfigRequest
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\SecurityCenter\V1\MuteConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateMuteConfigRequest;
use Google\Cloud\SecurityCenter\V1\MuteConfig;
/**
* @param string $formattedParent Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::organizationLocationName()} for help formatting this field.
* @param string $muteConfigFilter An expression that defines the filter to apply across
* create/update events of findings. While creating a filter string, be
* mindful of the scope in which the mute configuration is being created.
* E.g., If a filter contains project = X but is created under the project = Y
* scope, it might not match any findings.
*
* The following field and operator combinations are supported:
*
* * severity: `=`, `:`
* * category: `=`, `:`
* * resource.name: `=`, `:`
* * resource.project_name: `=`, `:`
* * resource.project_display_name: `=`, `:`
* * resource.folders.resource_folder: `=`, `:`
* * resource.parent_name: `=`, `:`
* * resource.parent_display_name: `=`, `:`
* * resource.type: `=`, `:`
* * finding_class: `=`, `:`
* * indicator.ip_addresses: `=`, `:`
* * indicator.domains: `=`, `:`
* @param string $muteConfigId Unique identifier provided by the client within the parent scope.
* It must consist of only lowercase letters, numbers, and hyphens, must start
* with a letter, must end with either a letter or a number, and must be 63
* characters or less.
*/
function create_mute_config_sample(
string $formattedParent,
string $muteConfigFilter,
string $muteConfigId
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$muteConfig = (new MuteConfig())
->setFilter($muteConfigFilter);
$request = (new CreateMuteConfigRequest())
->setParent($formattedParent)
->setMuteConfig($muteConfig)
->setMuteConfigId($muteConfigId);
// Call the API and handle any network failures.
try {
/** @var MuteConfig $response */
$response = $securityCenterClient->createMuteConfig($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 = SecurityCenterClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]');
$muteConfigFilter = '[FILTER]';
$muteConfigId = '[MUTE_CONFIG_ID]';
create_mute_config_sample($formattedParent, $muteConfigFilter, $muteConfigId);
}
createNotificationConfig
Creates a notification config.
The async variant is SecurityCenterClient::createNotificationConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateNotificationConfigRequest
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\SecurityCenter\V1\NotificationConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateNotificationConfigRequest;
use Google\Cloud\SecurityCenter\V1\NotificationConfig;
/**
* @param string $formattedParent Resource name of the new notification config's parent. Its format
* is `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::projectName()} for help formatting this field.
* @param string $configId Required.
* Unique identifier provided by the client within the parent scope.
* It must be between 1 and 128 characters and contain alphanumeric
* characters, underscores, or hyphens only.
*/
function create_notification_config_sample(string $formattedParent, string $configId): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$notificationConfig = new NotificationConfig();
$request = (new CreateNotificationConfigRequest())
->setParent($formattedParent)
->setConfigId($configId)
->setNotificationConfig($notificationConfig);
// Call the API and handle any network failures.
try {
/** @var NotificationConfig $response */
$response = $securityCenterClient->createNotificationConfig($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 = SecurityCenterClient::projectName('[PROJECT]');
$configId = '[CONFIG_ID]';
create_notification_config_sample($formattedParent, $configId);
}
createSecurityHealthAnalyticsCustomModule
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.
The async variant is SecurityCenterClient::createSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateSecurityHealthAnalyticsCustomModuleRequest;
use Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedParent Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* Please see {@see SecurityCenterClient::securityHealthAnalyticsSettingsName()} for help formatting this field.
*/
function create_security_health_analytics_custom_module_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// 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 = $securityCenterClient->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 = SecurityCenterClient::securityHealthAnalyticsSettingsName('[ORGANIZATION]');
create_security_health_analytics_custom_module_sample($formattedParent);
}
createSource
Creates a source.
The async variant is SecurityCenterClient::createSourceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateSourceRequest
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\SecurityCenter\V1\Source |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CreateSourceRequest;
use Google\Cloud\SecurityCenter\V1\Source;
/**
* @param string $formattedParent Resource name of the new source's parent. Its format should be
* `organizations/[organization_id]`. Please see
* {@see SecurityCenterClient::organizationName()} for help formatting this field.
*/
function create_source_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$source = new Source();
$request = (new CreateSourceRequest())
->setParent($formattedParent)
->setSource($source);
// Call the API and handle any network failures.
try {
/** @var Source $response */
$response = $securityCenterClient->createSource($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 = SecurityCenterClient::organizationName('[ORGANIZATION]');
create_source_sample($formattedParent);
}
deleteBigQueryExport
Deletes an existing BigQuery export.
The async variant is SecurityCenterClient::deleteBigQueryExportAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteBigQueryExportRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\DeleteBigQueryExportRequest;
/**
* @param string $formattedName The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* Please see {@see SecurityCenterClient::bigQueryExportName()} for help formatting this field.
*/
function delete_big_query_export_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new DeleteBigQueryExportRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterClient->deleteBigQueryExport($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 = SecurityCenterClient::bigQueryExportName('[ORGANIZATION]', '[EXPORT]');
delete_big_query_export_sample($formattedName);
}
deleteEventThreatDetectionCustomModule
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.
The async variant is SecurityCenterClient::deleteEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\DeleteEventThreatDetectionCustomModuleRequest;
/**
* @param string $formattedName Name of the custom module to delete.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
* * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
* * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. Please see
* {@see SecurityCenterClient::eventThreatDetectionCustomModuleName()} for help formatting this field.
*/
function delete_event_threat_detection_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new DeleteEventThreatDetectionCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterClient->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 = SecurityCenterClient::eventThreatDetectionCustomModuleName(
'[ORGANIZATION]',
'[MODULE]'
);
delete_event_threat_detection_custom_module_sample($formattedName);
}
deleteMuteConfig
Deletes an existing mute config.
The async variant is SecurityCenterClient::deleteMuteConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteMuteConfigRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\DeleteMuteConfigRequest;
/**
* @param string $formattedName Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`. Please see
* {@see SecurityCenterClient::muteConfigName()} for help formatting this field.
*/
function delete_mute_config_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new DeleteMuteConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterClient->deleteMuteConfig($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 = SecurityCenterClient::muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]');
delete_mute_config_sample($formattedName);
}
deleteNotificationConfig
Deletes a notification config.
The async variant is SecurityCenterClient::deleteNotificationConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteNotificationConfigRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\DeleteNotificationConfigRequest;
/**
* @param string $formattedName Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`,
* or `projects/[project_id]/notificationConfigs/[config_id]`. Please see
* {@see SecurityCenterClient::notificationConfigName()} for help formatting this field.
*/
function delete_notification_config_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new DeleteNotificationConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterClient->deleteNotificationConfig($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 = SecurityCenterClient::notificationConfigName(
'[ORGANIZATION]',
'[NOTIFICATION_CONFIG]'
);
delete_notification_config_sample($formattedName);
}
deleteResourceValueConfig
Deletes a ResourceValueConfig.
The async variant is SecurityCenterClient::deleteResourceValueConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteResourceValueConfigRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\DeleteResourceValueConfigRequest;
/**
* @param string $formattedName Name of the ResourceValueConfig to delete
* Please see {@see SecurityCenterClient::resourceValueConfigName()} for help formatting this field.
*/
function delete_resource_value_config_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new DeleteResourceValueConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterClient->deleteResourceValueConfig($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 = SecurityCenterClient::resourceValueConfigName(
'[ORGANIZATION]',
'[RESOURCE_VALUE_CONFIG]'
);
delete_resource_value_config_sample($formattedName);
}
deleteSecurityHealthAnalyticsCustomModule
Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.
The async variant is SecurityCenterClient::deleteSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\DeleteSecurityHealthAnalyticsCustomModuleRequest;
/**
* @param string $formattedName Name of the custom module to delete. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* Please see {@see SecurityCenterClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field.
*/
function delete_security_health_analytics_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new DeleteSecurityHealthAnalyticsCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$securityCenterClient->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 = SecurityCenterClient::securityHealthAnalyticsCustomModuleName(
'[ORGANIZATION]',
'[CUSTOM_MODULE]'
);
delete_security_health_analytics_custom_module_sample($formattedName);
}
getBigQueryExport
Gets a BigQuery export.
The async variant is SecurityCenterClient::getBigQueryExportAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetBigQueryExportRequest
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\SecurityCenter\V1\BigQueryExport |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\BigQueryExport;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetBigQueryExportRequest;
/**
* @param string $formattedName Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* Please see {@see SecurityCenterClient::bigQueryExportName()} for help formatting this field.
*/
function get_big_query_export_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetBigQueryExportRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var BigQueryExport $response */
$response = $securityCenterClient->getBigQueryExport($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 = SecurityCenterClient::bigQueryExportName('[ORGANIZATION]', '[EXPORT]');
get_big_query_export_sample($formattedName);
}
getEffectiveEventThreatDetectionCustomModule
Gets an effective Event Threat Detection custom module at the given level.
The async variant is SecurityCenterClient::getEffectiveEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\EffectiveEventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EffectiveEventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenter\V1\GetEffectiveEventThreatDetectionCustomModuleRequest;
/**
* @param string $formattedName The resource name of the effective Event Threat Detection custom
* module.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. Please see
* {@see SecurityCenterClient::effectiveEventThreatDetectionCustomModuleName()} for help formatting this field.
*/
function get_effective_event_threat_detection_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetEffectiveEventThreatDetectionCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EffectiveEventThreatDetectionCustomModule $response */
$response = $securityCenterClient->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 = SecurityCenterClient::effectiveEventThreatDetectionCustomModuleName(
'[ORGANIZATION]',
'[MODULE]'
);
get_effective_event_threat_detection_custom_module_sample($formattedName);
}
getEffectiveSecurityHealthAnalyticsCustomModule
Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
The async variant is SecurityCenterClient::getEffectiveSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\EffectiveSecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EffectiveSecurityHealthAnalyticsCustomModule;
use Google\Cloud\SecurityCenter\V1\GetEffectiveSecurityHealthAnalyticsCustomModuleRequest;
/**
* @param string $formattedName Name of the effective custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
* Please see {@see SecurityCenterClient::effectiveSecurityHealthAnalyticsCustomModuleName()} for help formatting this field.
*/
function get_effective_security_health_analytics_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EffectiveSecurityHealthAnalyticsCustomModule $response */
$response = $securityCenterClient->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 = SecurityCenterClient::effectiveSecurityHealthAnalyticsCustomModuleName(
'[ORGANIZATION]',
'[EFFECTIVE_CUSTOM_MODULE]'
);
get_effective_security_health_analytics_custom_module_sample($formattedName);
}
getEventThreatDetectionCustomModule
Gets an Event Threat Detection custom module.
The async variant is SecurityCenterClient::getEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\EventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenter\V1\GetEventThreatDetectionCustomModuleRequest;
/**
* @param string $formattedName Name of the custom module to get.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
* * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
* * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. Please see
* {@see SecurityCenterClient::eventThreatDetectionCustomModuleName()} for help formatting this field.
*/
function get_event_threat_detection_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetEventThreatDetectionCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EventThreatDetectionCustomModule $response */
$response = $securityCenterClient->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 = SecurityCenterClient::eventThreatDetectionCustomModuleName(
'[ORGANIZATION]',
'[MODULE]'
);
get_event_threat_detection_custom_module_sample($formattedName);
}
getIamPolicy
Gets the access control policy on the specified Source.
The async variant is SecurityCenterClient::getIamPolicyAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
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\Iam\V1\Policy |
use Google\ApiCore\ApiException;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
/**
* @param string $resource REQUIRED: The resource for which the policy is being requested.
* See the operation documentation for the appropriate value for this field.
*/
function get_iam_policy_sample(string $resource): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetIamPolicyRequest())
->setResource($resource);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $securityCenterClient->getIamPolicy($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
{
$resource = '[RESOURCE]';
get_iam_policy_sample($resource);
}
getMuteConfig
Gets a mute config.
The async variant is SecurityCenterClient::getMuteConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetMuteConfigRequest
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\SecurityCenter\V1\MuteConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetMuteConfigRequest;
use Google\Cloud\SecurityCenter\V1\MuteConfig;
/**
* @param string $formattedName Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`. Please see
* {@see SecurityCenterClient::muteConfigName()} for help formatting this field.
*/
function get_mute_config_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetMuteConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var MuteConfig $response */
$response = $securityCenterClient->getMuteConfig($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 = SecurityCenterClient::muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]');
get_mute_config_sample($formattedName);
}
getNotificationConfig
Gets a notification config.
The async variant is SecurityCenterClient::getNotificationConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetNotificationConfigRequest
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\SecurityCenter\V1\NotificationConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetNotificationConfigRequest;
use Google\Cloud\SecurityCenter\V1\NotificationConfig;
/**
* @param string $formattedName Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`,
* or `projects/[project_id]/notificationConfigs/[config_id]`. Please see
* {@see SecurityCenterClient::notificationConfigName()} for help formatting this field.
*/
function get_notification_config_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetNotificationConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var NotificationConfig $response */
$response = $securityCenterClient->getNotificationConfig($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 = SecurityCenterClient::notificationConfigName(
'[ORGANIZATION]',
'[NOTIFICATION_CONFIG]'
);
get_notification_config_sample($formattedName);
}
getOrganizationSettings
Gets the settings for an organization.
The async variant is SecurityCenterClient::getOrganizationSettingsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetOrganizationSettingsRequest
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\SecurityCenter\V1\OrganizationSettings |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetOrganizationSettingsRequest;
use Google\Cloud\SecurityCenter\V1\OrganizationSettings;
/**
* @param string $formattedName Name of the organization to get organization settings for. Its
* format is `organizations/[organization_id]/organizationSettings`. Please see
* {@see SecurityCenterClient::organizationSettingsName()} for help formatting this field.
*/
function get_organization_settings_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetOrganizationSettingsRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OrganizationSettings $response */
$response = $securityCenterClient->getOrganizationSettings($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 = SecurityCenterClient::organizationSettingsName('[ORGANIZATION]');
get_organization_settings_sample($formattedName);
}
getResourceValueConfig
Gets a ResourceValueConfig.
The async variant is SecurityCenterClient::getResourceValueConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetResourceValueConfigRequest
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\SecurityCenter\V1\ResourceValueConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetResourceValueConfigRequest;
use Google\Cloud\SecurityCenter\V1\ResourceValueConfig;
/**
* @param string $formattedName Name of the resource value config to retrieve. Its format is
* `organizations/{organization}/resourceValueConfigs/{config_id}`. Please see
* {@see SecurityCenterClient::resourceValueConfigName()} for help formatting this field.
*/
function get_resource_value_config_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetResourceValueConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ResourceValueConfig $response */
$response = $securityCenterClient->getResourceValueConfig($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 = SecurityCenterClient::resourceValueConfigName(
'[ORGANIZATION]',
'[RESOURCE_VALUE_CONFIG]'
);
get_resource_value_config_sample($formattedName);
}
getSecurityHealthAnalyticsCustomModule
Retrieves a SecurityHealthAnalyticsCustomModule.
The async variant is SecurityCenterClient::getSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetSecurityHealthAnalyticsCustomModuleRequest;
use Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedName Name of the custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* Please see {@see SecurityCenterClient::securityHealthAnalyticsCustomModuleName()} for help formatting this field.
*/
function get_security_health_analytics_custom_module_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetSecurityHealthAnalyticsCustomModuleRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var SecurityHealthAnalyticsCustomModule $response */
$response = $securityCenterClient->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 = SecurityCenterClient::securityHealthAnalyticsCustomModuleName(
'[ORGANIZATION]',
'[CUSTOM_MODULE]'
);
get_security_health_analytics_custom_module_sample($formattedName);
}
getSimulation
Get the simulation by name or the latest simulation for the given organization.
The async variant is SecurityCenterClient::getSimulationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetSimulationRequest
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\SecurityCenter\V1\Simulation |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetSimulationRequest;
use Google\Cloud\SecurityCenter\V1\Simulation;
/**
* @param string $formattedName The organization name or simulation name of this simulation
*
* Valid format:
* `organizations/{organization}/simulations/latest`
* `organizations/{organization}/simulations/{simulation}`
* Please see {@see SecurityCenterClient::simulationName()} for help formatting this field.
*/
function get_simulation_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetSimulationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Simulation $response */
$response = $securityCenterClient->getSimulation($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 = SecurityCenterClient::simulationName('[ORGANIZATION]', '[SIMULATION]');
get_simulation_sample($formattedName);
}
getSource
Gets a source.
The async variant is SecurityCenterClient::getSourceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetSourceRequest
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\SecurityCenter\V1\Source |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetSourceRequest;
use Google\Cloud\SecurityCenter\V1\Source;
/**
* @param string $formattedName Relative resource name of the source. Its format is
* `organizations/[organization_id]/source/[source_id]`. Please see
* {@see SecurityCenterClient::sourceName()} for help formatting this field.
*/
function get_source_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetSourceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Source $response */
$response = $securityCenterClient->getSource($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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]');
get_source_sample($formattedName);
}
getValuedResource
Get the valued resource by name
The async variant is SecurityCenterClient::getValuedResourceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetValuedResourceRequest
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\SecurityCenter\V1\ValuedResource |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GetValuedResourceRequest;
use Google\Cloud\SecurityCenter\V1\ValuedResource;
/**
* @param string $formattedName The name of this valued resource
*
* Valid format:
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* Please see {@see SecurityCenterClient::valuedResourceName()} for help formatting this field.
*/
function get_valued_resource_sample(string $formattedName): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GetValuedResourceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ValuedResource $response */
$response = $securityCenterClient->getValuedResource($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 = SecurityCenterClient::valuedResourceName(
'[ORGANIZATION]',
'[SIMULATION]',
'[VALUED_RESOURCE]'
);
get_valued_resource_sample($formattedName);
}
groupAssets
Filters an organization's assets and groups them by their specified properties.
The async variant is SecurityCenterClient::groupAssetsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GroupAssetsRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GroupAssetsRequest;
use Google\Cloud\SecurityCenter\V1\GroupResult;
/**
* @param string $formattedParent The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::projectName()} for help formatting this field.
* @param string $groupBy Expression that defines what assets fields to use for grouping.
* The string value should follow SQL syntax: comma separated list of fields.
* For example:
* "security_center_properties.resource_project,security_center_properties.project".
*
* The following fields are supported when compare_duration is not set:
*
* * security_center_properties.resource_project
* * security_center_properties.resource_project_display_name
* * security_center_properties.resource_type
* * security_center_properties.resource_parent
* * security_center_properties.resource_parent_display_name
*
* The following fields are supported when compare_duration is set:
*
* * security_center_properties.resource_type
* * security_center_properties.resource_project_display_name
* * security_center_properties.resource_parent_display_name
*/
function group_assets_sample(string $formattedParent, string $groupBy): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GroupAssetsRequest())
->setParent($formattedParent)
->setGroupBy($groupBy);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->groupAssets($request);
/** @var GroupResult $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 = SecurityCenterClient::projectName('[PROJECT]');
$groupBy = '[GROUP_BY]';
group_assets_sample($formattedParent, $groupBy);
}
groupFindings
Filters an organization or source's findings and groups them by their specified properties.
To group across all sources provide a -
as the source id.
Example: /v1/organizations/{organization_id}/sources/-/findings,
/v1/folders/{folder_id}/sources/-/findings,
/v1/projects/{project_id}/sources/-/findings
The async variant is SecurityCenterClient::groupFindingsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GroupFindingsRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\GroupFindingsRequest;
use Google\Cloud\SecurityCenter\V1\GroupResult;
/**
* @param string $formattedParent Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To groupBy across all sources
* provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`,
* or `projects/{project_id}/sources/-`
* Please see {@see SecurityCenterClient::sourceName()} for help formatting this field.
* @param string $groupBy Expression that defines what assets fields to use for grouping
* (including `state_change`). The string value should follow SQL syntax:
* comma separated list of fields. For example: "parent,resource_name".
*
* The following fields are supported when compare_duration is set:
*
* * state_change
*/
function group_findings_sample(string $formattedParent, string $groupBy): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new GroupFindingsRequest())
->setParent($formattedParent)
->setGroupBy($groupBy);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->groupFindings($request);
/** @var GroupResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]');
$groupBy = '[GROUP_BY]';
group_findings_sample($formattedParent, $groupBy);
}
listAssets
Lists an organization's assets.
The async variant is SecurityCenterClient::listAssetsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListAssetsRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListAssetsRequest;
use Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult;
/**
* @param string $formattedParent The name of the parent resource that contains the assets. The
* value that you can specify on parent depends on the method in which you
* specify parent. You can specify one of the following values:
* `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::projectName()} for help formatting this field.
*/
function list_assets_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListAssetsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listAssets($request);
/** @var ListAssetsResult $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 = SecurityCenterClient::projectName('[PROJECT]');
list_assets_sample($formattedParent);
}
listAttackPaths
Lists the attack paths for a set of simulation results or valued resources and filter.
The async variant is SecurityCenterClient::listAttackPathsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListAttackPathsRequest
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\SecurityCenter\V1\AttackPath;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListAttackPathsRequest;
/**
* @param string $formattedParent Name of parent to list attack paths.
*
* Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}`
* `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* Please see {@see SecurityCenterClient::valuedResourceName()} for help formatting this field.
*/
function list_attack_paths_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListAttackPathsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listAttackPaths($request);
/** @var AttackPath $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 = SecurityCenterClient::valuedResourceName(
'[ORGANIZATION]',
'[SIMULATION]',
'[VALUED_RESOURCE]'
);
list_attack_paths_sample($formattedParent);
}
listBigQueryExports
Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.
The async variant is SecurityCenterClient::listBigQueryExportsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListBigQueryExportsRequest
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\SecurityCenter\V1\BigQueryExport;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListBigQueryExportsRequest;
/**
* @param string $formattedParent The parent, which owns the collection of BigQuery exports. Its
* format is `organizations/[organization_id]`, `folders/[folder_id]`,
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::projectName()} for help formatting this field.
*/
function list_big_query_exports_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListBigQueryExportsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listBigQueryExports($request);
/** @var BigQueryExport $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 = SecurityCenterClient::projectName('[PROJECT]');
list_big_query_exports_sample($formattedParent);
}
listDescendantEventThreatDetectionCustomModules
Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.
The async variant is SecurityCenterClient::listDescendantEventThreatDetectionCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenter\V1\ListDescendantEventThreatDetectionCustomModulesRequest;
/**
* @param string $formattedParent Name of the parent to list custom modules under.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings`.
* * `folders/{folder}/eventThreatDetectionSettings`.
* * `projects/{project}/eventThreatDetectionSettings`. Please see
* {@see SecurityCenterClient::eventThreatDetectionSettingsName()} for help formatting this field.
*/
function list_descendant_event_threat_detection_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListDescendantEventThreatDetectionCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->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 = SecurityCenterClient::eventThreatDetectionSettingsName('[ORGANIZATION]');
list_descendant_event_threat_detection_custom_modules_sample($formattedParent);
}
listDescendantSecurityHealthAnalyticsCustomModules
Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.
The async variant is SecurityCenterClient::listDescendantSecurityHealthAnalyticsCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListDescendantSecurityHealthAnalyticsCustomModulesRequest;
use Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedParent Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* Please see {@see SecurityCenterClient::securityHealthAnalyticsSettingsName()} for help formatting this field.
*/
function list_descendant_security_health_analytics_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListDescendantSecurityHealthAnalyticsCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->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 = SecurityCenterClient::securityHealthAnalyticsSettingsName('[ORGANIZATION]');
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 SecurityCenterClient::listEffectiveEventThreatDetectionCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EffectiveEventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenter\V1\ListEffectiveEventThreatDetectionCustomModulesRequest;
/**
* @param string $formattedParent Name of the parent to list custom modules for.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings`.
* * `folders/{folder}/eventThreatDetectionSettings`.
* * `projects/{project}/eventThreatDetectionSettings`. Please see
* {@see SecurityCenterClient::eventThreatDetectionSettingsName()} for help formatting this field.
*/
function list_effective_event_threat_detection_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListEffectiveEventThreatDetectionCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->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 = SecurityCenterClient::eventThreatDetectionSettingsName('[ORGANIZATION]');
list_effective_event_threat_detection_custom_modules_sample($formattedParent);
}
listEffectiveSecurityHealthAnalyticsCustomModules
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.
The async variant is SecurityCenterClient::listEffectiveSecurityHealthAnalyticsCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EffectiveSecurityHealthAnalyticsCustomModule;
use Google\Cloud\SecurityCenter\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesRequest;
/**
* @param string $formattedParent Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* Please see {@see SecurityCenterClient::securityHealthAnalyticsSettingsName()} for help formatting this field.
*/
function list_effective_security_health_analytics_custom_modules_sample(
string $formattedParent
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->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 = SecurityCenterClient::securityHealthAnalyticsSettingsName('[ORGANIZATION]');
list_effective_security_health_analytics_custom_modules_sample($formattedParent);
}
listEventThreatDetectionCustomModules
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.
The async variant is SecurityCenterClient::listEventThreatDetectionCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenter\V1\ListEventThreatDetectionCustomModulesRequest;
/**
* @param string $formattedParent Name of the parent to list custom modules under.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings`.
* * `folders/{folder}/eventThreatDetectionSettings`.
* * `projects/{project}/eventThreatDetectionSettings`. Please see
* {@see SecurityCenterClient::eventThreatDetectionSettingsName()} for help formatting this field.
*/
function list_event_threat_detection_custom_modules_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListEventThreatDetectionCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->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 = SecurityCenterClient::eventThreatDetectionSettingsName('[ORGANIZATION]');
list_event_threat_detection_custom_modules_sample($formattedParent);
}
listFindings
Lists an organization or source's findings.
To list across all sources provide a -
as the source id.
Example: /v1/organizations/{organization_id}/sources/-/findings
The async variant is SecurityCenterClient::listFindingsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListFindingsRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListFindingsRequest;
use Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult;
/**
* @param string $formattedParent Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To list across all sources
* provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-`,
* `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
* Please see {@see SecurityCenterClient::sourceName()} for help formatting this field.
*/
function list_findings_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListFindingsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listFindings($request);
/** @var ListFindingsResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]');
list_findings_sample($formattedParent);
}
listMuteConfigs
Lists mute configs.
The async variant is SecurityCenterClient::listMuteConfigsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListMuteConfigsRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListMuteConfigsRequest;
use Google\Cloud\SecurityCenter\V1\MuteConfig;
/**
* @param string $formattedParent The parent, which owns the collection of mute configs. Its format
* is `organizations/[organization_id]`, `folders/[folder_id]`,
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::organizationLocationName()} for help formatting this field.
*/
function list_mute_configs_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListMuteConfigsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listMuteConfigs($request);
/** @var MuteConfig $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 = SecurityCenterClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]');
list_mute_configs_sample($formattedParent);
}
listNotificationConfigs
Lists notification configs.
The async variant is SecurityCenterClient::listNotificationConfigsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListNotificationConfigsRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListNotificationConfigsRequest;
use Google\Cloud\SecurityCenter\V1\NotificationConfig;
/**
* @param string $formattedParent The name of the parent in which to list the notification
* configurations. Its format is "organizations/[organization_id]",
* "folders/[folder_id]", or "projects/[project_id]". Please see
* {@see SecurityCenterClient::projectName()} for help formatting this field.
*/
function list_notification_configs_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListNotificationConfigsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listNotificationConfigs($request);
/** @var NotificationConfig $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 = SecurityCenterClient::projectName('[PROJECT]');
list_notification_configs_sample($formattedParent);
}
listResourceValueConfigs
Lists all ResourceValueConfigs.
The async variant is SecurityCenterClient::listResourceValueConfigsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListResourceValueConfigsRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListResourceValueConfigsRequest;
use Google\Cloud\SecurityCenter\V1\ResourceValueConfig;
/**
* @param string $formattedParent The parent, which owns the collection of resource value configs.
* Its format is
* `organizations/[organization_id]`
* Please see {@see SecurityCenterClient::organizationName()} for help formatting this field.
*/
function list_resource_value_configs_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListResourceValueConfigsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listResourceValueConfigs($request);
/** @var ResourceValueConfig $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 = SecurityCenterClient::organizationName('[ORGANIZATION]');
list_resource_value_configs_sample($formattedParent);
}
listSecurityHealthAnalyticsCustomModules
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.
The async variant is SecurityCenterClient::listSecurityHealthAnalyticsCustomModulesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListSecurityHealthAnalyticsCustomModulesRequest;
use Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule;
/**
* @param string $formattedParent Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* Please see {@see SecurityCenterClient::securityHealthAnalyticsSettingsName()} for help formatting this field.
*/
function list_security_health_analytics_custom_modules_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListSecurityHealthAnalyticsCustomModulesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->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 = SecurityCenterClient::securityHealthAnalyticsSettingsName('[ORGANIZATION]');
list_security_health_analytics_custom_modules_sample($formattedParent);
}
listSources
Lists all sources belonging to an organization.
The async variant is SecurityCenterClient::listSourcesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListSourcesRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListSourcesRequest;
use Google\Cloud\SecurityCenter\V1\Source;
/**
* @param string $formattedParent Resource name of the parent of sources to list. Its format should
* be `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`. Please see
* {@see SecurityCenterClient::projectName()} for help formatting this field.
*/
function list_sources_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListSourcesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listSources($request);
/** @var Source $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 = SecurityCenterClient::projectName('[PROJECT]');
list_sources_sample($formattedParent);
}
listValuedResources
Lists the valued resources for a set of simulation results and filter.
The async variant is SecurityCenterClient::listValuedResourcesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListValuedResourcesRequest
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\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ListValuedResourcesRequest;
use Google\Cloud\SecurityCenter\V1\ValuedResource;
/**
* @param string $formattedParent Name of parent to list valued resources.
*
* Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}`
* `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* Please see {@see SecurityCenterClient::simulationName()} for help formatting this field.
*/
function list_valued_resources_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new ListValuedResourcesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $securityCenterClient->listValuedResources($request);
/** @var ValuedResource $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 = SecurityCenterClient::simulationName('[ORGANIZATION]', '[SIMULATION]');
list_valued_resources_sample($formattedParent);
}
runAssetDiscovery
Runs asset discovery. The discovery is tracked with a long-running operation.
This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.
The async variant is SecurityCenterClient::runAssetDiscoveryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryRequest
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\OperationResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryRequest;
use Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse;
use Google\Rpc\Status;
/**
* @param string $formattedParent Name of the organization to run asset discovery for. Its format
* is `organizations/[organization_id]`. Please see
* {@see SecurityCenterClient::organizationName()} for help formatting this field.
*/
function run_asset_discovery_sample(string $formattedParent): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new RunAssetDiscoveryRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $securityCenterClient->runAssetDiscovery($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var RunAssetDiscoveryResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = SecurityCenterClient::organizationName('[ORGANIZATION]');
run_asset_discovery_sample($formattedParent);
}
setFindingState
Updates the state of a finding.
The async variant is SecurityCenterClient::setFindingStateAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\SetFindingStateRequest
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\SecurityCenter\V1\Finding |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\Finding;
use Google\Cloud\SecurityCenter\V1\Finding\State;
use Google\Cloud\SecurityCenter\V1\SetFindingStateRequest;
use Google\Protobuf\Timestamp;
/**
* @param string $formattedName The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* of the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. Please see
* {@see SecurityCenterClient::findingName()} for help formatting this field.
* @param int $state The desired State of the finding.
*/
function set_finding_state_sample(string $formattedName, int $state): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$startTime = new Timestamp();
$request = (new SetFindingStateRequest())
->setName($formattedName)
->setState($state)
->setStartTime($startTime);
// Call the API and handle any network failures.
try {
/** @var Finding $response */
$response = $securityCenterClient->setFindingState($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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]');
$state = State::STATE_UNSPECIFIED;
set_finding_state_sample($formattedName, $state);
}
setIamPolicy
Sets the access control policy on the specified Source.
The async variant is SecurityCenterClient::setIamPolicyAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
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\Iam\V1\Policy |
use Google\ApiCore\ApiException;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
/**
* @param string $resource REQUIRED: The resource for which the policy is being specified.
* See the operation documentation for the appropriate value for this field.
*/
function set_iam_policy_sample(string $resource): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$policy = new Policy();
$request = (new SetIamPolicyRequest())
->setResource($resource)
->setPolicy($policy);
// Call the API and handle any network failures.
try {
/** @var Policy $response */
$response = $securityCenterClient->setIamPolicy($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
{
$resource = '[RESOURCE]';
set_iam_policy_sample($resource);
}
setMute
Updates the mute state of a finding.
The async variant is SecurityCenterClient::setMuteAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\SetMuteRequest
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\SecurityCenter\V1\Finding |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\Finding;
use Google\Cloud\SecurityCenter\V1\Finding\Mute;
use Google\Cloud\SecurityCenter\V1\SetMuteRequest;
/**
* @param string $formattedName The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* of the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. Please see
* {@see SecurityCenterClient::findingName()} for help formatting this field.
* @param int $mute The desired state of the Mute.
*/
function set_mute_sample(string $formattedName, int $mute): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$request = (new SetMuteRequest())
->setName($formattedName)
->setMute($mute);
// Call the API and handle any network failures.
try {
/** @var Finding $response */
$response = $securityCenterClient->setMute($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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]');
$mute = Mute::MUTE_UNSPECIFIED;
set_mute_sample($formattedName, $mute);
}
simulateSecurityHealthAnalyticsCustomModule
Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
The async variant is SecurityCenterClient::simulateSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\CustomConfig;
use Google\Cloud\SecurityCenter\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest;
use Google\Cloud\SecurityCenter\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest\SimulatedResource;
use Google\Cloud\SecurityCenter\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse;
/**
* @param string $parent 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}`
* @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.
$securityCenterClient = new SecurityCenterClient();
// 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 = $securityCenterClient->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);
}
testIamPermissions
Returns the permissions that a caller has on the specified source.
The async variant is SecurityCenterClient::testIamPermissionsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
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\Iam\V1\TestIamPermissionsResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsResponse;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
/**
* @param string $resource REQUIRED: The resource for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
* @param string $permissionsElement The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
* information see
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
*/
function test_iam_permissions_sample(string $resource, string $permissionsElement): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$permissions = [$permissionsElement,];
$request = (new TestIamPermissionsRequest())
->setResource($resource)
->setPermissions($permissions);
// Call the API and handle any network failures.
try {
/** @var TestIamPermissionsResponse $response */
$response = $securityCenterClient->testIamPermissions($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
{
$resource = '[RESOURCE]';
$permissionsElement = '[PERMISSIONS]';
test_iam_permissions_sample($resource, $permissionsElement);
}
updateBigQueryExport
Updates a BigQuery export.
The async variant is SecurityCenterClient::updateBigQueryExportAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateBigQueryExportRequest
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\SecurityCenter\V1\BigQueryExport |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\BigQueryExport;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\UpdateBigQueryExportRequest;
/**
* 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_big_query_export_sample(): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$bigQueryExport = new BigQueryExport();
$request = (new UpdateBigQueryExportRequest())
->setBigQueryExport($bigQueryExport);
// Call the API and handle any network failures.
try {
/** @var BigQueryExport $response */
$response = $securityCenterClient->updateBigQueryExport($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
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 SecurityCenterClient::updateEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\EventThreatDetectionCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule;
use Google\Cloud\SecurityCenter\V1\UpdateEventThreatDetectionCustomModuleRequest;
/**
* 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.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$eventThreatDetectionCustomModule = new EventThreatDetectionCustomModule();
$request = (new UpdateEventThreatDetectionCustomModuleRequest())
->setEventThreatDetectionCustomModule($eventThreatDetectionCustomModule);
// Call the API and handle any network failures.
try {
/** @var EventThreatDetectionCustomModule $response */
$response = $securityCenterClient->updateEventThreatDetectionCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateExternalSystem
Updates external system. This is for a given finding.
The async variant is SecurityCenterClient::updateExternalSystemAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateExternalSystemRequest
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\SecurityCenter\V1\ExternalSystem |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ExternalSystem;
use Google\Cloud\SecurityCenter\V1\UpdateExternalSystemRequest;
/**
* 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_external_system_sample(): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$externalSystem = new ExternalSystem();
$request = (new UpdateExternalSystemRequest())
->setExternalSystem($externalSystem);
// Call the API and handle any network failures.
try {
/** @var ExternalSystem $response */
$response = $securityCenterClient->updateExternalSystem($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateFinding
Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.
The async variant is SecurityCenterClient::updateFindingAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateFindingRequest
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\SecurityCenter\V1\Finding |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\Finding;
use Google\Cloud\SecurityCenter\V1\UpdateFindingRequest;
/**
* 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_finding_sample(): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$finding = new Finding();
$request = (new UpdateFindingRequest())
->setFinding($finding);
// Call the API and handle any network failures.
try {
/** @var Finding $response */
$response = $securityCenterClient->updateFinding($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateMuteConfig
Updates a mute config.
The async variant is SecurityCenterClient::updateMuteConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateMuteConfigRequest
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\SecurityCenter\V1\MuteConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\MuteConfig;
use Google\Cloud\SecurityCenter\V1\UpdateMuteConfigRequest;
/**
* @param string $muteConfigFilter An expression that defines the filter to apply across
* create/update events of findings. While creating a filter string, be
* mindful of the scope in which the mute configuration is being created.
* E.g., If a filter contains project = X but is created under the project = Y
* scope, it might not match any findings.
*
* The following field and operator combinations are supported:
*
* * severity: `=`, `:`
* * category: `=`, `:`
* * resource.name: `=`, `:`
* * resource.project_name: `=`, `:`
* * resource.project_display_name: `=`, `:`
* * resource.folders.resource_folder: `=`, `:`
* * resource.parent_name: `=`, `:`
* * resource.parent_display_name: `=`, `:`
* * resource.type: `=`, `:`
* * finding_class: `=`, `:`
* * indicator.ip_addresses: `=`, `:`
* * indicator.domains: `=`, `:`
*/
function update_mute_config_sample(string $muteConfigFilter): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$muteConfig = (new MuteConfig())
->setFilter($muteConfigFilter);
$request = (new UpdateMuteConfigRequest())
->setMuteConfig($muteConfig);
// Call the API and handle any network failures.
try {
/** @var MuteConfig $response */
$response = $securityCenterClient->updateMuteConfig($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
{
$muteConfigFilter = '[FILTER]';
update_mute_config_sample($muteConfigFilter);
}
updateNotificationConfig
Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter
The async variant is SecurityCenterClient::updateNotificationConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateNotificationConfigRequest
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\SecurityCenter\V1\NotificationConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\NotificationConfig;
use Google\Cloud\SecurityCenter\V1\UpdateNotificationConfigRequest;
/**
* 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_notification_config_sample(): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$notificationConfig = new NotificationConfig();
$request = (new UpdateNotificationConfigRequest())
->setNotificationConfig($notificationConfig);
// Call the API and handle any network failures.
try {
/** @var NotificationConfig $response */
$response = $securityCenterClient->updateNotificationConfig($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateOrganizationSettings
Updates an organization's settings.
The async variant is SecurityCenterClient::updateOrganizationSettingsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateOrganizationSettingsRequest
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\SecurityCenter\V1\OrganizationSettings |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\OrganizationSettings;
use Google\Cloud\SecurityCenter\V1\UpdateOrganizationSettingsRequest;
/**
* 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_organization_settings_sample(): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$organizationSettings = new OrganizationSettings();
$request = (new UpdateOrganizationSettingsRequest())
->setOrganizationSettings($organizationSettings);
// Call the API and handle any network failures.
try {
/** @var OrganizationSettings $response */
$response = $securityCenterClient->updateOrganizationSettings($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateResourceValueConfig
Updates an existing ResourceValueConfigs with new rules.
The async variant is SecurityCenterClient::updateResourceValueConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateResourceValueConfigRequest
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\SecurityCenter\V1\ResourceValueConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ResourceValue;
use Google\Cloud\SecurityCenter\V1\ResourceValueConfig;
use Google\Cloud\SecurityCenter\V1\UpdateResourceValueConfigRequest;
/**
* @param int $resourceValueConfigResourceValue Resource value level this expression represents
* @param string $resourceValueConfigTagValuesElement Tag values combined with `AND` to check against.
* Values in the form "tagValues/123"
* Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]`
* https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing
*/
function update_resource_value_config_sample(
int $resourceValueConfigResourceValue,
string $resourceValueConfigTagValuesElement
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$resourceValueConfigTagValues = [$resourceValueConfigTagValuesElement,];
$resourceValueConfig = (new ResourceValueConfig())
->setResourceValue($resourceValueConfigResourceValue)
->setTagValues($resourceValueConfigTagValues);
$request = (new UpdateResourceValueConfigRequest())
->setResourceValueConfig($resourceValueConfig);
// Call the API and handle any network failures.
try {
/** @var ResourceValueConfig $response */
$response = $securityCenterClient->updateResourceValueConfig($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
{
$resourceValueConfigResourceValue = ResourceValue::RESOURCE_VALUE_UNSPECIFIED;
$resourceValueConfigTagValuesElement = '[TAG_VALUES]';
update_resource_value_config_sample(
$resourceValueConfigResourceValue,
$resourceValueConfigTagValuesElement
);
}
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 config of a module is supported on resident modules only.
The async variant is SecurityCenterClient::updateSecurityHealthAnalyticsCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule;
use Google\Cloud\SecurityCenter\V1\UpdateSecurityHealthAnalyticsCustomModuleRequest;
/**
* 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.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule();
$request = (new UpdateSecurityHealthAnalyticsCustomModuleRequest())
->setSecurityHealthAnalyticsCustomModule($securityHealthAnalyticsCustomModule);
// Call the API and handle any network failures.
try {
/** @var SecurityHealthAnalyticsCustomModule $response */
$response = $securityCenterClient->updateSecurityHealthAnalyticsCustomModule($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateSecurityMarks
Updates security marks.
The async variant is SecurityCenterClient::updateSecurityMarksAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateSecurityMarksRequest
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\SecurityCenter\V1\SecurityMarks |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\SecurityMarks;
use Google\Cloud\SecurityCenter\V1\UpdateSecurityMarksRequest;
/**
* 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_marks_sample(): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$securityMarks = new SecurityMarks();
$request = (new UpdateSecurityMarksRequest())
->setSecurityMarks($securityMarks);
// Call the API and handle any network failures.
try {
/** @var SecurityMarks $response */
$response = $securityCenterClient->updateSecurityMarks($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
updateSource
Updates a source.
The async variant is SecurityCenterClient::updateSourceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateSourceRequest
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\SecurityCenter\V1\Source |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\Source;
use Google\Cloud\SecurityCenter\V1\UpdateSourceRequest;
/**
* 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_source_sample(): void
{
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// Prepare the request message.
$source = new Source();
$request = (new UpdateSourceRequest())
->setSource($source);
// Call the API and handle any network failures.
try {
/** @var Source $response */
$response = $securityCenterClient->updateSource($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 SecurityCenterClient::validateEventThreatDetectionCustomModuleAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\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\SecurityCenter\V1\ValidateEventThreatDetectionCustomModuleResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\SecurityCenter\V1\Client\SecurityCenterClient;
use Google\Cloud\SecurityCenter\V1\ValidateEventThreatDetectionCustomModuleRequest;
use Google\Cloud\SecurityCenter\V1\ValidateEventThreatDetectionCustomModuleResponse;
/**
* @param string $formattedParent Resource name of the parent to validate the Custom Module under.
*
* Its format is:
*
* * `organizations/{organization}/eventThreatDetectionSettings`.
* * `folders/{folder}/eventThreatDetectionSettings`.
* * `projects/{project}/eventThreatDetectionSettings`. Please see
* {@see SecurityCenterClient::eventThreatDetectionSettingsName()} 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 (e.g. CONFIGURABLE_BAD_IP).
*/
function validate_event_threat_detection_custom_module_sample(
string $formattedParent,
string $rawText,
string $type
): void {
// Create a client.
$securityCenterClient = new SecurityCenterClient();
// 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 = $securityCenterClient->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 = SecurityCenterClient::eventThreatDetectionSettingsName('[ORGANIZATION]');
$rawText = '[RAW_TEXT]';
$type = '[TYPE]';
validate_event_threat_detection_custom_module_sample($formattedParent, $rawText, $type);
}
batchCreateResourceValueConfigsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\BatchCreateResourceValueConfigsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\BatchCreateResourceValueConfigsResponse> |
bulkMuteFindingsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\BulkMuteFindingsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createBigQueryExportAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateBigQueryExportRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\BigQueryExport> |
createEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule> |
createFindingAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateFindingRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Finding> |
createMuteConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateMuteConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\MuteConfig> |
createNotificationConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateNotificationConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\NotificationConfig> |
createSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule> |
createSourceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\CreateSourceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Source> |
deleteBigQueryExportAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteBigQueryExportRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
deleteEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
deleteMuteConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteMuteConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
deleteNotificationConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteNotificationConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
deleteResourceValueConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteResourceValueConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
deleteSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\DeleteSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
getBigQueryExportAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetBigQueryExportRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\BigQueryExport> |
getEffectiveEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetEffectiveEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\EffectiveEventThreatDetectionCustomModule> |
getEffectiveSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetEffectiveSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\EffectiveSecurityHealthAnalyticsCustomModule> |
getEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule> |
getIamPolicyAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\Policy> |
getMuteConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetMuteConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\MuteConfig> |
getNotificationConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetNotificationConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\NotificationConfig> |
getOrganizationSettingsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetOrganizationSettingsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\OrganizationSettings> |
getResourceValueConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetResourceValueConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\ResourceValueConfig> |
getSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule> |
getSimulationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetSimulationRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Simulation> |
getSourceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetSourceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Source> |
getValuedResourceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GetValuedResourceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\ValuedResource> |
groupAssetsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GroupAssetsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
groupFindingsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\GroupFindingsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listAssetsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListAssetsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listAttackPathsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListAttackPathsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listBigQueryExportsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListBigQueryExportsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listDescendantEventThreatDetectionCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListDescendantEventThreatDetectionCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listDescendantSecurityHealthAnalyticsCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListDescendantSecurityHealthAnalyticsCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEffectiveEventThreatDetectionCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListEffectiveEventThreatDetectionCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEffectiveSecurityHealthAnalyticsCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListEffectiveSecurityHealthAnalyticsCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEventThreatDetectionCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListEventThreatDetectionCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listFindingsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListFindingsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listMuteConfigsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListMuteConfigsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listNotificationConfigsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListNotificationConfigsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listResourceValueConfigsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListResourceValueConfigsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listSecurityHealthAnalyticsCustomModulesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListSecurityHealthAnalyticsCustomModulesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listSourcesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListSourcesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listValuedResourcesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ListValuedResourcesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
runAssetDiscoveryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
setFindingStateAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\SetFindingStateRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Finding> |
setIamPolicyAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\Policy> |
setMuteAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\SetMuteRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Finding> |
simulateSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\SimulateSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\SimulateSecurityHealthAnalyticsCustomModuleResponse> |
testIamPermissionsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\TestIamPermissionsResponse> |
updateBigQueryExportAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateBigQueryExportRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\BigQueryExport> |
updateEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\EventThreatDetectionCustomModule> |
updateExternalSystemAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateExternalSystemRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\ExternalSystem> |
updateFindingAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateFindingRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Finding> |
updateMuteConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateMuteConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\MuteConfig> |
updateNotificationConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateNotificationConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\NotificationConfig> |
updateOrganizationSettingsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateOrganizationSettingsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\OrganizationSettings> |
updateResourceValueConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateResourceValueConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\ResourceValueConfig> |
updateSecurityHealthAnalyticsCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateSecurityHealthAnalyticsCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\SecurityHealthAnalyticsCustomModule> |
updateSecurityMarksAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateSecurityMarksRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\SecurityMarks> |
updateSourceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\UpdateSourceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\Source> |
validateEventThreatDetectionCustomModuleAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\SecurityCenter\V1\ValidateEventThreatDetectionCustomModuleRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SecurityCenter\V1\ValidateEventThreatDetectionCustomModuleResponse> |
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
Returns | |
---|---|
Type | Description |
Google\LongRunning\Client\OperationsClient |
resumeOperation
Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.
Parameters | |
---|---|
Name | Description |
operationName |
string
The name of the long running operation |
methodName |
string
The name of the method used to start the operation |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
static::bigQueryExportName
Formats a string containing the fully-qualified path to represent a big_query_export resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
export |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted big_query_export resource. |
static::dlpJobName
Formats a string containing the fully-qualified path to represent a dlp_job resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
dlpJob |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted dlp_job resource. |
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
|
module |
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
|
effectiveCustomModule |
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
|
module |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted event_threat_detection_custom_module resource. |
static::eventThreatDetectionSettingsName
Formats a string containing the fully-qualified path to represent a event_threat_detection_settings resource.
Parameter | |
---|---|
Name | Description |
organization |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted event_threat_detection_settings resource. |
static::externalSystemName
Formats a string containing the fully-qualified path to represent a external_system resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
source |
string
|
finding |
string
|
externalsystem |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted external_system resource. |
static::findingName
Formats a string containing the fully-qualified path to represent a finding resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
source |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted finding resource. |
static::folderName
Formats a string containing the fully-qualified path to represent a folder resource.
Parameter | |
---|---|
Name | Description |
folder |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder resource. |
static::folderAssetSecurityMarksName
Formats a string containing the fully-qualified path to represent a folder_asset_securityMarks resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
asset |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_asset_securityMarks resource. |
static::folderConstraintNameName
Formats a string containing the fully-qualified path to represent a folder_constraint_name resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
constraintName |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_constraint_name resource. |
static::folderCustomModuleName
Formats a string containing the fully-qualified path to represent a folder_custom_module resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
customModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_custom_module resource. |
static::folderEffectiveCustomModuleName
Formats a string containing the fully-qualified path to represent a folder_effective_custom_module resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
effectiveCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_effective_custom_module resource. |
static::folderEventThreatDetectionSettingsName
Formats a string containing the fully-qualified path to represent a folder_eventThreatDetectionSettings resource.
Parameter | |
---|---|
Name | Description |
folder |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_eventThreatDetectionSettings resource. |
static::folderExportName
Formats a string containing the fully-qualified path to represent a folder_export resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
export |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_export 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::folderLocationMuteConfigName
Formats a string containing the fully-qualified path to represent a folder_location_mute_config resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
location |
string
|
muteConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_location_mute_config resource. |
static::folderModuleName
Formats a string containing the fully-qualified path to represent a folder_module resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
module |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_module resource. |
static::folderMuteConfigName
Formats a string containing the fully-qualified path to represent a folder_mute_config resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
muteConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_mute_config resource. |
static::folderNotificationConfigName
Formats a string containing the fully-qualified path to represent a folder_notification_config resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
notificationConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_notification_config resource. |
static::folderSecurityHealthAnalyticsSettingsName
Formats a string containing the fully-qualified path to represent a folder_securityHealthAnalyticsSettings resource.
Parameter | |
---|---|
Name | Description |
folder |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_securityHealthAnalyticsSettings resource. |
static::folderSourceName
Formats a string containing the fully-qualified path to represent a folder_source resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
source |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_source resource. |
static::folderSourceFindingName
Formats a string containing the fully-qualified path to represent a folder_source_finding resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
source |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_source_finding resource. |
static::folderSourceFindingExternalsystemName
Formats a string containing the fully-qualified path to represent a folder_source_finding_externalsystem resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
source |
string
|
finding |
string
|
externalsystem |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_source_finding_externalsystem resource. |
static::folderSourceFindingSecurityMarksName
Formats a string containing the fully-qualified path to represent a folder_source_finding_securityMarks resource.
Parameters | |
---|---|
Name | Description |
folder |
string
|
source |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted folder_source_finding_securityMarks 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::muteConfigName
Formats a string containing the fully-qualified path to represent a mute_config resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
muteConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted mute_config resource. |
static::notificationConfigName
Formats a string containing the fully-qualified path to represent a notification_config resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
notificationConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted notification_config resource. |
static::organizationName
Formats a string containing the fully-qualified path to represent a organization resource.
Parameter | |
---|---|
Name | Description |
organization |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization resource. |
static::organizationAssetSecurityMarksName
Formats a string containing the fully-qualified path to represent a organization_asset_securityMarks resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
asset |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_asset_securityMarks resource. |
static::organizationConstraintNameName
Formats a string containing the fully-qualified path to represent a organization_constraint_name resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
constraintName |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_constraint_name resource. |
static::organizationCustomModuleName
Formats a string containing the fully-qualified path to represent a organization_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
customModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_custom_module resource. |
static::organizationEffectiveCustomModuleName
Formats a string containing the fully-qualified path to represent a organization_effective_custom_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
effectiveCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_effective_custom_module resource. |
static::organizationEventThreatDetectionSettingsName
Formats a string containing the fully-qualified path to represent a organization_eventThreatDetectionSettings resource.
Parameter | |
---|---|
Name | Description |
organization |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_eventThreatDetectionSettings resource. |
static::organizationExportName
Formats a string containing the fully-qualified path to represent a organization_export resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
export |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_export 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::organizationLocationMuteConfigName
Formats a string containing the fully-qualified path to represent a organization_location_mute_config resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
location |
string
|
muteConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_location_mute_config resource. |
static::organizationModuleName
Formats a string containing the fully-qualified path to represent a organization_module resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
module |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_module resource. |
static::organizationMuteConfigName
Formats a string containing the fully-qualified path to represent a organization_mute_config resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
muteConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_mute_config resource. |
static::organizationNotificationConfigName
Formats a string containing the fully-qualified path to represent a organization_notification_config resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
notificationConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_notification_config resource. |
static::organizationSecurityHealthAnalyticsSettingsName
Formats a string containing the fully-qualified path to represent a organization_securityHealthAnalyticsSettings resource.
Parameter | |
---|---|
Name | Description |
organization |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_securityHealthAnalyticsSettings resource. |
static::organizationSettingsName
Formats a string containing the fully-qualified path to represent a organization_settings resource.
Parameter | |
---|---|
Name | Description |
organization |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_settings resource. |
static::organizationSourceName
Formats a string containing the fully-qualified path to represent a organization_source resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
source |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_source resource. |
static::organizationSourceFindingName
Formats a string containing the fully-qualified path to represent a organization_source_finding resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
source |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_source_finding resource. |
static::organizationSourceFindingExternalsystemName
Formats a string containing the fully-qualified path to represent a organization_source_finding_externalsystem resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
source |
string
|
finding |
string
|
externalsystem |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_source_finding_externalsystem resource. |
static::organizationSourceFindingSecurityMarksName
Formats a string containing the fully-qualified path to represent a organization_source_finding_securityMarks resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
source |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted organization_source_finding_securityMarks resource. |
static::policyName
Formats a string containing the fully-qualified path to represent a policy resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
constraintName |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted policy resource. |
static::projectName
Formats a string containing the fully-qualified path to represent a project resource.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project resource. |
static::projectAssetSecurityMarksName
Formats a string containing the fully-qualified path to represent a project_asset_securityMarks resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
asset |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_asset_securityMarks resource. |
static::projectConstraintNameName
Formats a string containing the fully-qualified path to represent a project_constraint_name resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
constraintName |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_constraint_name resource. |
static::projectCustomModuleName
Formats a string containing the fully-qualified path to represent a project_custom_module resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
customModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_custom_module resource. |
static::projectDlpJobName
Formats a string containing the fully-qualified path to represent a project_dlp_job resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
dlpJob |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_dlp_job resource. |
static::projectEffectiveCustomModuleName
Formats a string containing the fully-qualified path to represent a project_effective_custom_module resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
effectiveCustomModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_effective_custom_module resource. |
static::projectEventThreatDetectionSettingsName
Formats a string containing the fully-qualified path to represent a project_eventThreatDetectionSettings resource.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_eventThreatDetectionSettings resource. |
static::projectExportName
Formats a string containing the fully-qualified path to represent a project_export resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
export |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_export resource. |
static::projectLocationDlpJobName
Formats a string containing the fully-qualified path to represent a project_location_dlp_job resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
dlpJob |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_dlp_job resource. |
static::projectLocationMuteConfigName
Formats a string containing the fully-qualified path to represent a project_location_mute_config resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
muteConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_mute_config resource. |
static::projectLocationTableProfileName
Formats a string containing the fully-qualified path to represent a project_location_table_profile resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
tableProfile |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_location_table_profile resource. |
static::projectModuleName
Formats a string containing the fully-qualified path to represent a project_module resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
module |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_module resource. |
static::projectMuteConfigName
Formats a string containing the fully-qualified path to represent a project_mute_config resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
muteConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_mute_config resource. |
static::projectNotificationConfigName
Formats a string containing the fully-qualified path to represent a project_notification_config resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
notificationConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_notification_config resource. |
static::projectSecurityHealthAnalyticsSettingsName
Formats a string containing the fully-qualified path to represent a project_securityHealthAnalyticsSettings resource.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_securityHealthAnalyticsSettings resource. |
static::projectSourceName
Formats a string containing the fully-qualified path to represent a project_source resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
source |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_source resource. |
static::projectSourceFindingName
Formats a string containing the fully-qualified path to represent a project_source_finding resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
source |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_source_finding resource. |
static::projectSourceFindingExternalsystemName
Formats a string containing the fully-qualified path to represent a project_source_finding_externalsystem resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
source |
string
|
finding |
string
|
externalsystem |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_source_finding_externalsystem resource. |
static::projectSourceFindingSecurityMarksName
Formats a string containing the fully-qualified path to represent a project_source_finding_securityMarks resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
source |
string
|
finding |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_source_finding_securityMarks resource. |
static::projectTableProfileName
Formats a string containing the fully-qualified path to represent a project_table_profile resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
tableProfile |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted project_table_profile resource. |
static::resourceValueConfigName
Formats a string containing the fully-qualified path to represent a resource_value_config resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
resourceValueConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted resource_value_config 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
|
customModule |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted security_health_analytics_custom_module resource. |
static::securityHealthAnalyticsSettingsName
Formats a string containing the fully-qualified path to represent a security_health_analytics_settings resource.
Parameter | |
---|---|
Name | Description |
organization |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted security_health_analytics_settings resource. |
static::securityMarksName
Formats a string containing the fully-qualified path to represent a security_marks resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
asset |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted security_marks resource. |
static::simulationName
Formats a string containing the fully-qualified path to represent a simulation resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
simulation |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted simulation resource. |
static::sourceName
Formats a string containing the fully-qualified path to represent a source resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
source |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted source resource. |
static::tableDataProfileName
Formats a string containing the fully-qualified path to represent a table_data_profile resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
tableProfile |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted table_data_profile resource. |
static::topicName
Formats a string containing the fully-qualified path to represent a topic resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
topic |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted topic resource. |
static::valuedResourceName
Formats a string containing the fully-qualified path to represent a valued_resource resource.
Parameters | |
---|---|
Name | Description |
organization |
string
|
simulation |
string
|
valuedResource |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted valued_resource 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
- bigQueryExport: organizations/{organization}/bigQueryExports/{export}
- dlpJob: projects/{project}/dlpJobs/{dlp_job}
- effectiveEventThreatDetectionCustomModule: organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}
- effectiveSecurityHealthAnalyticsCustomModule: organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}
- eventThreatDetectionCustomModule: organizations/{organization}/eventThreatDetectionSettings/customModules/{module}
- eventThreatDetectionSettings: organizations/{organization}/eventThreatDetectionSettings
- externalSystem: organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}
- finding: organizations/{organization}/sources/{source}/findings/{finding}
- folder: folders/{folder}
- folderAssetSecurityMarks: folders/{folder}/assets/{asset}/securityMarks
- folderConstraintName: folders/{folder}/policies/{constraint_name}
- folderCustomModule: folders/{folder}/securityHealthAnalyticsSettings/customModules/{custom_module}
- folderEffectiveCustomModule: folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}
- folderEventThreatDetectionSettings: folders/{folder}/eventThreatDetectionSettings
- folderExport: folders/{folder}/bigQueryExports/{export}
- folderLocation: folders/{folder}/locations/{location}
- folderLocationMuteConfig: folders/{folder}/locations/{location}/muteConfigs/{mute_config}
- folderModule: folders/{folder}/eventThreatDetectionSettings/customModules/{module}
- folderMuteConfig: folders/{folder}/muteConfigs/{mute_config}
- folderNotificationConfig: folders/{folder}/notificationConfigs/{notification_config}
- folderSecurityHealthAnalyticsSettings: folders/{folder}/securityHealthAnalyticsSettings
- folderSource: folders/{folder}/sources/{source}
- folderSourceFinding: folders/{folder}/sources/{source}/findings/{finding}
- folderSourceFindingExternalsystem: folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}
- folderSourceFindingSecurityMarks: folders/{folder}/sources/{source}/findings/{finding}/securityMarks
- location: projects/{project}/locations/{location}
- muteConfig: organizations/{organization}/muteConfigs/{mute_config}
- notificationConfig: organizations/{organization}/notificationConfigs/{notification_config}
- organization: organizations/{organization}
- organizationAssetSecurityMarks: organizations/{organization}/assets/{asset}/securityMarks
- organizationConstraintName: organizations/{organization}/policies/{constraint_name}
- organizationCustomModule: organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}
- organizationEffectiveCustomModule: organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}
- organizationEventThreatDetectionSettings: organizations/{organization}/eventThreatDetectionSettings
- organizationExport: organizations/{organization}/bigQueryExports/{export}
- organizationLocation: organizations/{organization}/locations/{location}
- organizationLocationMuteConfig: organizations/{organization}/locations/{location}/muteConfigs/{mute_config}
- organizationModule: organizations/{organization}/eventThreatDetectionSettings/customModules/{module}
- organizationMuteConfig: organizations/{organization}/muteConfigs/{mute_config}
- organizationNotificationConfig: organizations/{organization}/notificationConfigs/{notification_config}
- organizationSecurityHealthAnalyticsSettings: organizations/{organization}/securityHealthAnalyticsSettings
- organizationSettings: organizations/{organization}/organizationSettings
- organizationSource: organizations/{organization}/sources/{source}
- organizationSourceFinding: organizations/{organization}/sources/{source}/findings/{finding}
- organizationSourceFindingExternalsystem: organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}
- organizationSourceFindingSecurityMarks: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks
- policy: organizations/{organization}/policies/{constraint_name}
- project: projects/{project}
- projectAssetSecurityMarks: projects/{project}/assets/{asset}/securityMarks
- projectConstraintName: projects/{project}/policies/{constraint_name}
- projectCustomModule: projects/{project}/securityHealthAnalyticsSettings/customModules/{custom_module}
- projectDlpJob: projects/{project}/dlpJobs/{dlp_job}
- projectEffectiveCustomModule: projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}
- projectEventThreatDetectionSettings: projects/{project}/eventThreatDetectionSettings
- projectExport: projects/{project}/bigQueryExports/{export}
- projectLocationDlpJob: projects/{project}/locations/{location}/dlpJobs/{dlp_job}
- projectLocationMuteConfig: projects/{project}/locations/{location}/muteConfigs/{mute_config}
- projectLocationTableProfile: projects/{project}/locations/{location}/tableProfiles/{table_profile}
- projectModule: projects/{project}/eventThreatDetectionSettings/customModules/{module}
- projectMuteConfig: projects/{project}/muteConfigs/{mute_config}
- projectNotificationConfig: projects/{project}/notificationConfigs/{notification_config}
- projectSecurityHealthAnalyticsSettings: projects/{project}/securityHealthAnalyticsSettings
- projectSource: projects/{project}/sources/{source}
- projectSourceFinding: projects/{project}/sources/{source}/findings/{finding}
- projectSourceFindingExternalsystem: projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}
- projectSourceFindingSecurityMarks: projects/{project}/sources/{source}/findings/{finding}/securityMarks
- projectTableProfile: projects/{project}/tableProfiles/{table_profile}
- resourceValueConfig: organizations/{organization}/resourceValueConfigs/{resource_value_config}
- securityHealthAnalyticsCustomModule: organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}
- securityHealthAnalyticsSettings: organizations/{organization}/securityHealthAnalyticsSettings
- securityMarks: organizations/{organization}/assets/{asset}/securityMarks
- simulation: organizations/{organization}/simulations/{simulation}
- source: organizations/{organization}/sources/{source}
- tableDataProfile: projects/{project}/tableProfiles/{table_profile}
- topic: projects/{project}/topics/{topic}
- valuedResource: organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}
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. |