Google Cloud Chronicle V1 Client - Class FindingsRefinementServiceClient (0.5.0)

Reference documentation and code samples for the Google Cloud Chronicle V1 Client class FindingsRefinementServiceClient.

Service Description: FindingsRefinementService provides an interface for filtering out findings that are unlikely to be real threats to prevent them from triggering alerts or notifications.

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 \ Chronicle \ V1 \ Client

Methods

__construct

Constructor.

Parameters
Name Description
options array|Google\ApiCore\Options\ClientOptions

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 Google\Auth\FetchAuthTokenInterface|Google\ApiCore\CredentialsWrapper

This option should only be used with a pre-constructed Google\Auth\FetchAuthTokenInterface or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. Important: If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Cloud\Chronicle\V1\FindingsRefinementServiceClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new FindingsRefinementServiceClient(['credentials' => $creds]); https://cloud.google.com/docs/authentication/external/externally-sourced-credentials

↳ 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 false.

↳ 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|Google\ApiCore\Transport\TransportInterface

The transport used for executing network requests. May be either the string rest or grpc. Defaults to grpc if gRPC support is detected on the system. Advanced usage: Additionally, it is possible to pass in an already instantiated Google\ApiCore\Transport\TransportInterface object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.

↳ 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.

↳ logger false|Psr\Log\LoggerInterface

A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag

↳ universeDomain string

The service domain for the client. Defaults to 'googleapis.com'.

computeAllFindingsRefinementActivities

Returns findings refinement activity for all findings refinements.

The async variant is FindingsRefinementServiceClient::computeAllFindingsRefinementActivitiesAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ComputeAllFindingsRefinementActivitiesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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\Chronicle\V1\ComputeAllFindingsRefinementActivitiesResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\ComputeAllFindingsRefinementActivitiesRequest;
use Google\Cloud\Chronicle\V1\ComputeAllFindingsRefinementActivitiesResponse;

/**
 * @param string $formattedInstance The ID of the Instance to retrieve counts for.
 *                                  Format:
 *                                  projects/{project}/locations/{location}/instances/{instance}
 *                                  Please see {@see FindingsRefinementServiceClient::instanceName()} for help formatting this field.
 */
function compute_all_findings_refinement_activities_sample(string $formattedInstance): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $request = (new ComputeAllFindingsRefinementActivitiesRequest())
        ->setInstance($formattedInstance);

    // Call the API and handle any network failures.
    try {
        /** @var ComputeAllFindingsRefinementActivitiesResponse $response */
        $response = $findingsRefinementServiceClient->computeAllFindingsRefinementActivities($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
{
    $formattedInstance = FindingsRefinementServiceClient::instanceName(
        '[PROJECT]',
        '[LOCATION]',
        '[INSTANCE]'
    );

    compute_all_findings_refinement_activities_sample($formattedInstance);
}

computeFindingsRefinementActivity

Returns findings refinement activity for a specific findings refinement.

The async variant is FindingsRefinementServiceClient::computeFindingsRefinementActivityAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ComputeFindingsRefinementActivityRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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\Chronicle\V1\ComputeFindingsRefinementActivityResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\ComputeFindingsRefinementActivityRequest;
use Google\Cloud\Chronicle\V1\ComputeFindingsRefinementActivityResponse;

/**
 * @param string $formattedName Full resource name for the findings refinement to fetch the
 *                              activity for. Format:
 *                              projects/{project}/locations/{region}/instances/{instance}/findingsRefinements/{findings_refinement}
 *                              Please see {@see FindingsRefinementServiceClient::findingsRefinementName()} for help formatting this field.
 */
function compute_findings_refinement_activity_sample(string $formattedName): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $request = (new ComputeFindingsRefinementActivityRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var ComputeFindingsRefinementActivityResponse $response */
        $response = $findingsRefinementServiceClient->computeFindingsRefinementActivity($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 = FindingsRefinementServiceClient::findingsRefinementName(
        '[PROJECT]',
        '[LOCATION]',
        '[INSTANCE]',
        '[FINDINGS_REFINEMENT]'
    );

    compute_findings_refinement_activity_sample($formattedName);
}

createFindingsRefinement

Creates a new findings refinement.

The async variant is FindingsRefinementServiceClient::createFindingsRefinementAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\CreateFindingsRefinementRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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\Chronicle\V1\FindingsRefinement
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\CreateFindingsRefinementRequest;
use Google\Cloud\Chronicle\V1\FindingsRefinement;

/**
 * @param string $formattedParent The parent resource where this findings refinement will be
 *                                created. Format:
 *                                projects/{project}/locations/{location}/instances/{instance}
 *                                Please see {@see FindingsRefinementServiceClient::instanceName()} for help formatting this field.
 */
function create_findings_refinement_sample(string $formattedParent): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $findingsRefinement = new FindingsRefinement();
    $request = (new CreateFindingsRefinementRequest())
        ->setParent($formattedParent)
        ->setFindingsRefinement($findingsRefinement);

    // Call the API and handle any network failures.
    try {
        /** @var FindingsRefinement $response */
        $response = $findingsRefinementServiceClient->createFindingsRefinement($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 = FindingsRefinementServiceClient::instanceName(
        '[PROJECT]',
        '[LOCATION]',
        '[INSTANCE]'
    );

    create_findings_refinement_sample($formattedParent);
}

getFindingsRefinement

Gets a single findings refinement.

The async variant is FindingsRefinementServiceClient::getFindingsRefinementAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\GetFindingsRefinementRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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\Chronicle\V1\FindingsRefinement
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\FindingsRefinement;
use Google\Cloud\Chronicle\V1\GetFindingsRefinementRequest;

/**
 * @param string $formattedName The name of the findings refinement to retrieve.
 *                              Format:
 *                              projects/{project}/locations/{location}/instances/{instance}/findingsRefinements/{findings_refinement}
 *                              Please see {@see FindingsRefinementServiceClient::findingsRefinementName()} for help formatting this field.
 */
function get_findings_refinement_sample(string $formattedName): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $request = (new GetFindingsRefinementRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var FindingsRefinement $response */
        $response = $findingsRefinementServiceClient->getFindingsRefinement($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 = FindingsRefinementServiceClient::findingsRefinementName(
        '[PROJECT]',
        '[LOCATION]',
        '[INSTANCE]',
        '[FINDINGS_REFINEMENT]'
    );

    get_findings_refinement_sample($formattedName);
}

getFindingsRefinementDeployment

Gets a findings refinement deployment.

The async variant is FindingsRefinementServiceClient::getFindingsRefinementDeploymentAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\GetFindingsRefinementDeploymentRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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\Chronicle\V1\FindingsRefinementDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\FindingsRefinementDeployment;
use Google\Cloud\Chronicle\V1\GetFindingsRefinementDeploymentRequest;

/**
 * @param string $formattedName The name of the findings refinement to retrieve.
 *                              Format:
 *                              projects/{project}/locations/{location}/instances/{instance}/findingsRefinements/{findings_refinement}/deployment
 *                              Please see {@see FindingsRefinementServiceClient::findingsRefinementDeploymentName()} for help formatting this field.
 */
function get_findings_refinement_deployment_sample(string $formattedName): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $request = (new GetFindingsRefinementDeploymentRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var FindingsRefinementDeployment $response */
        $response = $findingsRefinementServiceClient->getFindingsRefinementDeployment($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 = FindingsRefinementServiceClient::findingsRefinementDeploymentName(
        '[PROJECT]',
        '[LOCATION]',
        '[INSTANCE]',
        '[FINDINGS_REFINEMENT]'
    );

    get_findings_refinement_deployment_sample($formattedName);
}

listAllFindingsRefinementDeployments

Lists all findings refinement deployments.

The async variant is FindingsRefinementServiceClient::listAllFindingsRefinementDeploymentsAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ListAllFindingsRefinementDeploymentsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\FindingsRefinementDeployment;
use Google\Cloud\Chronicle\V1\ListAllFindingsRefinementDeploymentsRequest;

/**
 * @param string $formattedInstance The name of the parent resource, which is the SecOps instance to
 *                                  list all findings refinement deployments over. Format:
 *                                  projects/{project}/locations/{location}/instances/{instance}
 *                                  Please see {@see FindingsRefinementServiceClient::instanceName()} for help formatting this field.
 */
function list_all_findings_refinement_deployments_sample(string $formattedInstance): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $request = (new ListAllFindingsRefinementDeploymentsRequest())
        ->setInstance($formattedInstance);

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $findingsRefinementServiceClient->listAllFindingsRefinementDeployments($request);

        /** @var FindingsRefinementDeployment $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
{
    $formattedInstance = FindingsRefinementServiceClient::instanceName(
        '[PROJECT]',
        '[LOCATION]',
        '[INSTANCE]'
    );

    list_all_findings_refinement_deployments_sample($formattedInstance);
}

listFindingsRefinements

Lists a collection of findings refinements.

The async variant is FindingsRefinementServiceClient::listFindingsRefinementsAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ListFindingsRefinementsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\FindingsRefinement;
use Google\Cloud\Chronicle\V1\ListFindingsRefinementsRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of findings refinements.
 *                                Format:
 *                                projects/{project}/locations/{location}/instances/{instance}
 *                                Please see {@see FindingsRefinementServiceClient::instanceName()} for help formatting this field.
 */
function list_findings_refinements_sample(string $formattedParent): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $request = (new ListFindingsRefinementsRequest())
        ->setParent($formattedParent);

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $findingsRefinementServiceClient->listFindingsRefinements($request);

        /** @var FindingsRefinement $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 = FindingsRefinementServiceClient::instanceName(
        '[PROJECT]',
        '[LOCATION]',
        '[INSTANCE]'
    );

    list_findings_refinements_sample($formattedParent);
}

updateFindingsRefinement

Updates a findings refinement.

The async variant is FindingsRefinementServiceClient::updateFindingsRefinementAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\UpdateFindingsRefinementRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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\Chronicle\V1\FindingsRefinement
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\FindingsRefinement;
use Google\Cloud\Chronicle\V1\UpdateFindingsRefinementRequest;

/**
 * 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_findings_refinement_sample(): void
{
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $findingsRefinement = new FindingsRefinement();
    $request = (new UpdateFindingsRefinementRequest())
        ->setFindingsRefinement($findingsRefinement);

    // Call the API and handle any network failures.
    try {
        /** @var FindingsRefinement $response */
        $response = $findingsRefinementServiceClient->updateFindingsRefinement($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

updateFindingsRefinementDeployment

Updates a findings refinement deployment.

The async variant is FindingsRefinementServiceClient::updateFindingsRefinementDeploymentAsync() .

Parameters
Name Description
request Google\Cloud\Chronicle\V1\UpdateFindingsRefinementDeploymentRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings Google\ApiCore\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\Chronicle\V1\FindingsRefinementDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Chronicle\V1\Client\FindingsRefinementServiceClient;
use Google\Cloud\Chronicle\V1\FindingsRefinementDeployment;
use Google\Cloud\Chronicle\V1\UpdateFindingsRefinementDeploymentRequest;
use Google\Protobuf\FieldMask;

/**
 * @param string $findingsRefinementDeploymentName The resource name of the findings refinement deployment.
 *                                                 Format:
 *                                                 projects/{project}/locations/{location}/instances/{instance}/findingsRefinements/{findings_refinement}/deployment
 */
function update_findings_refinement_deployment_sample(
    string $findingsRefinementDeploymentName
): void {
    // Create a client.
    $findingsRefinementServiceClient = new FindingsRefinementServiceClient();

    // Prepare the request message.
    $findingsRefinementDeployment = (new FindingsRefinementDeployment())
        ->setName($findingsRefinementDeploymentName);
    $updateMask = new FieldMask();
    $request = (new UpdateFindingsRefinementDeploymentRequest())
        ->setFindingsRefinementDeployment($findingsRefinementDeployment)
        ->setUpdateMask($updateMask);

    // Call the API and handle any network failures.
    try {
        /** @var FindingsRefinementDeployment $response */
        $response = $findingsRefinementServiceClient->updateFindingsRefinementDeployment($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
{
    $findingsRefinementDeploymentName = '[NAME]';

    update_findings_refinement_deployment_sample($findingsRefinementDeploymentName);
}

computeAllFindingsRefinementActivitiesAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ComputeAllFindingsRefinementActivitiesRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Chronicle\V1\ComputeAllFindingsRefinementActivitiesResponse>

computeFindingsRefinementActivityAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ComputeFindingsRefinementActivityRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Chronicle\V1\ComputeFindingsRefinementActivityResponse>

createFindingsRefinementAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\CreateFindingsRefinementRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Chronicle\V1\FindingsRefinement>

getFindingsRefinementAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\GetFindingsRefinementRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Chronicle\V1\FindingsRefinement>

getFindingsRefinementDeploymentAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\GetFindingsRefinementDeploymentRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Chronicle\V1\FindingsRefinementDeployment>

listAllFindingsRefinementDeploymentsAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ListAllFindingsRefinementDeploymentsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listFindingsRefinementsAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\ListFindingsRefinementsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

updateFindingsRefinementAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\UpdateFindingsRefinementRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Chronicle\V1\FindingsRefinement>

updateFindingsRefinementDeploymentAsync

Parameters
Name Description
request Google\Cloud\Chronicle\V1\UpdateFindingsRefinementDeploymentRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Chronicle\V1\FindingsRefinementDeployment>

static::curatedRuleName

Formats a string containing the fully-qualified path to represent a curated_rule resource.

Parameters
Name Description
project string
location string
instance string
curatedRule string
Returns
Type Description
string The formatted curated_rule resource.

static::curatedRuleSetName

Formats a string containing the fully-qualified path to represent a curated_rule_set resource.

Parameters
Name Description
project string
location string
instance string
category string
ruleSet string
Returns
Type Description
string The formatted curated_rule_set resource.

static::findingsRefinementName

Formats a string containing the fully-qualified path to represent a findings_refinement resource.

Parameters
Name Description
project string
location string
instance string
findingsRefinement string
Returns
Type Description
string The formatted findings_refinement resource.

static::findingsRefinementDeploymentName

Formats a string containing the fully-qualified path to represent a findings_refinement_deployment resource.

Parameters
Name Description
project string
location string
instance string
findingsRefinement string
Returns
Type Description
string The formatted findings_refinement_deployment resource.

static::instanceName

Formats a string containing the fully-qualified path to represent a instance resource.

Parameters
Name Description
project string
location string
instance string
Returns
Type Description
string The formatted instance resource.

static::ruleName

Formats a string containing the fully-qualified path to represent a rule resource.

Parameters
Name Description
project string
location string
instance string
rule string
Returns
Type Description
string The formatted rule 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

  • curatedRule: projects/{project}/locations/{location}/instances/{instance}/curatedRules/{curatedRule}
  • curatedRuleSet: projects/{project}/locations/{location}/instances/{instance}/curatedRuleSetCategories/{category}/curatedRuleSets/{rule_set}
  • findingsRefinement: projects/{project}/locations/{location}/instances/{instance}/findingsRefinements/{findings_refinement}
  • findingsRefinementDeployment: projects/{project}/locations/{location}/instances/{instance}/findingsRefinements/{findings_refinement}/deployment
  • instance: projects/{project}/locations/{location}/instances/{instance}
  • rule: projects/{project}/locations/{location}/instances/{instance}/rules/{rule}

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.