Google Cloud Dataplex V1 Client - Class DataplexServiceClient (0.14.0)

Reference documentation and code samples for the Google Cloud Dataplex V1 Client class DataplexServiceClient.

Service Description: Dataplex service provides data lakes as a service. The primary resources offered by this service are Lakes, Zones and Assets which collectively allow a data administrator to organize, manage, secure and catalog data across their organization located across cloud projects in a variety of storage systems including Cloud Storage and BigQuery.

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

Methods

__construct

Constructor.

Parameters
NameDescription
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 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|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.

cancelJob

Cancel jobs running for the task resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::cancelJobAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CancelJobRequest

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.

Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\CancelJobRequest;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;

/**
 * @param string $formattedName The resource name of the job:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. Please see
 *                              {@see DataplexServiceClient::jobName()} for help formatting this field.
 */
function cancel_job_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        $dataplexServiceClient->cancelJob($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 = DataplexServiceClient::jobName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[TASK]',
        '[JOB]'
    );

    cancel_job_sample($formattedName);
}

createAsset

Creates an asset resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::createAssetAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateAssetRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Asset;
use Google\Cloud\Dataplex\V1\Asset\ResourceSpec;
use Google\Cloud\Dataplex\V1\Asset\ResourceSpec\Type;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\CreateAssetRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedParent       The resource name of the parent zone:
 *                                      `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see
 *                                      {@see DataplexServiceClient::zoneName()} for help formatting this field.
 * @param string $assetId               Asset identifier.
 *                                      This ID will be used to generate names such as table names when publishing
 *                                      metadata to Hive Metastore and BigQuery.
 *                                      * Must contain only lowercase letters, numbers and hyphens.
 *                                      * Must start with a letter.
 *                                      * Must end with a number or a letter.
 *                                      * Must be between 1-63 characters.
 *                                      * Must be unique within the zone.
 * @param int    $assetResourceSpecType Immutable. Type of resource.
 */
function create_asset_sample(
    string $formattedParent,
    string $assetId,
    int $assetResourceSpecType
): void {
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $assetResourceSpec = (new ResourceSpec())
        ->setType($assetResourceSpecType);
    $asset = (new Asset())
        ->setResourceSpec($assetResourceSpec);
    $request = (new CreateAssetRequest())
        ->setParent($formattedParent)
        ->setAssetId($assetId)
        ->setAsset($asset);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->createAsset($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Asset $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]');
    $assetId = '[ASSET_ID]';
    $assetResourceSpecType = Type::TYPE_UNSPECIFIED;

    create_asset_sample($formattedParent, $assetId, $assetResourceSpecType);
}

createEnvironment

Create an environment resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::createEnvironmentAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateEnvironmentRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\CreateEnvironmentRequest;
use Google\Cloud\Dataplex\V1\Environment;
use Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec;
use Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                                  The resource name of the parent lake:
 *                                                                 `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                                                                 {@see DataplexServiceClient::lakeName()} for help formatting this field.
 * @param string $environmentId                                    Environment identifier.
 *                                                                 * Must contain only lowercase letters, numbers and hyphens.
 *                                                                 * Must start with a letter.
 *                                                                 * Must be between 1-63 characters.
 *                                                                 * Must end with a number or a letter.
 *                                                                 * Must be unique within the lake.
 * @param string $environmentInfrastructureSpecOsImageImageVersion Dataplex Image version.
 */
function create_environment_sample(
    string $formattedParent,
    string $environmentId,
    string $environmentInfrastructureSpecOsImageImageVersion
): void {
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $environmentInfrastructureSpecOsImage = (new OsImageRuntime())
        ->setImageVersion($environmentInfrastructureSpecOsImageImageVersion);
    $environmentInfrastructureSpec = (new InfrastructureSpec())
        ->setOsImage($environmentInfrastructureSpecOsImage);
    $environment = (new Environment())
        ->setInfrastructureSpec($environmentInfrastructureSpec);
    $request = (new CreateEnvironmentRequest())
        ->setParent($formattedParent)
        ->setEnvironmentId($environmentId)
        ->setEnvironment($environment);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->createEnvironment($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Environment $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');
    $environmentId = '[ENVIRONMENT_ID]';
    $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]';

    create_environment_sample(
        $formattedParent,
        $environmentId,
        $environmentInfrastructureSpecOsImageImageVersion
    );
}

createLake

Creates a lake resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::createLakeAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateLakeRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\CreateLakeRequest;
use Google\Cloud\Dataplex\V1\Lake;
use Google\Rpc\Status;

/**
 * @param string $formattedParent The resource name of the lake location, of the form:
 *                                projects/{project_number}/locations/{location_id}
 *                                where `location_id` refers to a GCP region. Please see
 *                                {@see DataplexServiceClient::locationName()} for help formatting this field.
 * @param string $lakeId          Lake identifier.
 *                                This ID will be used to generate names such as database and dataset names
 *                                when publishing metadata to Hive Metastore and BigQuery.
 *                                * Must contain only lowercase letters, numbers and hyphens.
 *                                * Must start with a letter.
 *                                * Must end with a number or a letter.
 *                                * Must be between 1-63 characters.
 *                                * Must be unique within the customer project / location.
 */
function create_lake_sample(string $formattedParent, string $lakeId): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $lake = new Lake();
    $request = (new CreateLakeRequest())
        ->setParent($formattedParent)
        ->setLakeId($lakeId)
        ->setLake($lake);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->createLake($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Lake $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 = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $lakeId = '[LAKE_ID]';

    create_lake_sample($formattedParent, $lakeId);
}

createTask

Creates a task resource within a lake.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::createTaskAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateTaskRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\CreateTaskRequest;
use Google\Cloud\Dataplex\V1\Task;
use Google\Cloud\Dataplex\V1\Task\ExecutionSpec;
use Google\Cloud\Dataplex\V1\Task\TriggerSpec;
use Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                 The resource name of the parent lake:
 *                                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                                                {@see DataplexServiceClient::lakeName()} for help formatting this field.
 * @param string $taskId                          Task identifier.
 * @param int    $taskTriggerSpecType             Immutable. Trigger type of the user-specified Task.
 * @param string $taskExecutionSpecServiceAccount Service account to use to execute a task.
 *                                                If not provided, the default Compute service account for the project is
 *                                                used.
 */
function create_task_sample(
    string $formattedParent,
    string $taskId,
    int $taskTriggerSpecType,
    string $taskExecutionSpecServiceAccount
): void {
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $taskTriggerSpec = (new TriggerSpec())
        ->setType($taskTriggerSpecType);
    $taskExecutionSpec = (new ExecutionSpec())
        ->setServiceAccount($taskExecutionSpecServiceAccount);
    $task = (new Task())
        ->setTriggerSpec($taskTriggerSpec)
        ->setExecutionSpec($taskExecutionSpec);
    $request = (new CreateTaskRequest())
        ->setParent($formattedParent)
        ->setTaskId($taskId)
        ->setTask($task);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->createTask($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Task $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');
    $taskId = '[TASK_ID]';
    $taskTriggerSpecType = Type::TYPE_UNSPECIFIED;
    $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]';

    create_task_sample(
        $formattedParent,
        $taskId,
        $taskTriggerSpecType,
        $taskExecutionSpecServiceAccount
    );
}

createZone

Creates a zone resource within a lake.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::createZoneAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateZoneRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\CreateZoneRequest;
use Google\Cloud\Dataplex\V1\Zone;
use Google\Cloud\Dataplex\V1\Zone\ResourceSpec;
use Google\Cloud\Dataplex\V1\Zone\ResourceSpec\LocationType;
use Google\Cloud\Dataplex\V1\Zone\Type;
use Google\Rpc\Status;

/**
 * @param string $formattedParent              The resource name of the parent lake:
 *                                             `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                                             {@see DataplexServiceClient::lakeName()} for help formatting this field.
 * @param string $zoneId                       Zone identifier.
 *                                             This ID will be used to generate names such as database and dataset names
 *                                             when publishing metadata to Hive Metastore and BigQuery.
 *                                             * Must contain only lowercase letters, numbers and hyphens.
 *                                             * Must start with a letter.
 *                                             * Must end with a number or a letter.
 *                                             * Must be between 1-63 characters.
 *                                             * Must be unique across all lakes from all locations in a project.
 *                                             * Must not be one of the reserved IDs (i.e. "default", "global-temp")
 * @param int    $zoneType                     Immutable. The type of the zone.
 * @param int    $zoneResourceSpecLocationType Immutable. The location type of the resources that are allowed
 *                                             to be attached to the assets within this zone.
 */
function create_zone_sample(
    string $formattedParent,
    string $zoneId,
    int $zoneType,
    int $zoneResourceSpecLocationType
): void {
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $zoneResourceSpec = (new ResourceSpec())
        ->setLocationType($zoneResourceSpecLocationType);
    $zone = (new Zone())
        ->setType($zoneType)
        ->setResourceSpec($zoneResourceSpec);
    $request = (new CreateZoneRequest())
        ->setParent($formattedParent)
        ->setZoneId($zoneId)
        ->setZone($zone);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->createZone($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Zone $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');
    $zoneId = '[ZONE_ID]';
    $zoneType = Type::TYPE_UNSPECIFIED;
    $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED;

    create_zone_sample($formattedParent, $zoneId, $zoneType, $zoneResourceSpecLocationType);
}

deleteAsset

Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::deleteAssetAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteAssetRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\DeleteAssetRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the asset:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see
 *                              {@see DataplexServiceClient::assetName()} for help formatting this field.
 */
function delete_asset_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->deleteAsset($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } 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
{
    $formattedName = DataplexServiceClient::assetName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[ZONE]',
        '[ASSET]'
    );

    delete_asset_sample($formattedName);
}

deleteEnvironment

Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::deleteEnvironmentAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteEnvironmentRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\DeleteEnvironmentRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the environment:
 *                              `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see
 *                              {@see DataplexServiceClient::environmentName()} for help formatting this field.
 */
function delete_environment_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->deleteEnvironment($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } 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
{
    $formattedName = DataplexServiceClient::environmentName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[ENVIRONMENT]'
    );

    delete_environment_sample($formattedName);
}

deleteLake

Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::deleteLakeAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteLakeRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\DeleteLakeRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the lake:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                              {@see DataplexServiceClient::lakeName()} for help formatting this field.
 */
function delete_lake_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->deleteLake($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } 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
{
    $formattedName = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');

    delete_lake_sample($formattedName);
}

deleteTask

Delete the task resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::deleteTaskAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteTaskRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\DeleteTaskRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the task:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. Please see
 *                              {@see DataplexServiceClient::taskName()} for help formatting this field.
 */
function delete_task_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->deleteTask($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } 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
{
    $formattedName = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]');

    delete_task_sample($formattedName);
}

deleteZone

Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::deleteZoneAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteZoneRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\DeleteZoneRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the zone:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see
 *                              {@see DataplexServiceClient::zoneName()} for help formatting this field.
 */
function delete_zone_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->deleteZone($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } 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
{
    $formattedName = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]');

    delete_zone_sample($formattedName);
}

getAsset

Retrieves an asset resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::getAssetAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetAssetRequest

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
TypeDescription
Google\Cloud\Dataplex\V1\Asset
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Asset;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\GetAssetRequest;

/**
 * @param string $formattedName The resource name of the asset:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see
 *                              {@see DataplexServiceClient::assetName()} for help formatting this field.
 */
function get_asset_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Asset $response */
        $response = $dataplexServiceClient->getAsset($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 = DataplexServiceClient::assetName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[ZONE]',
        '[ASSET]'
    );

    get_asset_sample($formattedName);
}

getEnvironment

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetEnvironmentRequest

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
TypeDescription
Google\Cloud\Dataplex\V1\Environment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\Environment;
use Google\Cloud\Dataplex\V1\GetEnvironmentRequest;

/**
 * @param string $formattedName The resource name of the environment:
 *                              `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see
 *                              {@see DataplexServiceClient::environmentName()} for help formatting this field.
 */
function get_environment_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Environment $response */
        $response = $dataplexServiceClient->getEnvironment($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 = DataplexServiceClient::environmentName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[ENVIRONMENT]'
    );

    get_environment_sample($formattedName);
}

getJob

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetJobRequest

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
TypeDescription
Google\Cloud\Dataplex\V1\Job
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\GetJobRequest;
use Google\Cloud\Dataplex\V1\Job;

/**
 * @param string $formattedName The resource name of the job:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. Please see
 *                              {@see DataplexServiceClient::jobName()} for help formatting this field.
 */
function get_job_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Job $response */
        $response = $dataplexServiceClient->getJob($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 = DataplexServiceClient::jobName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[TASK]',
        '[JOB]'
    );

    get_job_sample($formattedName);
}

getLake

Retrieves a lake resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::getLakeAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetLakeRequest

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
TypeDescription
Google\Cloud\Dataplex\V1\Lake
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\GetLakeRequest;
use Google\Cloud\Dataplex\V1\Lake;

/**
 * @param string $formattedName The resource name of the lake:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                              {@see DataplexServiceClient::lakeName()} for help formatting this field.
 */
function get_lake_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Lake $response */
        $response = $dataplexServiceClient->getLake($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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');

    get_lake_sample($formattedName);
}

getTask

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetTaskRequest

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
TypeDescription
Google\Cloud\Dataplex\V1\Task
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\GetTaskRequest;
use Google\Cloud\Dataplex\V1\Task;

/**
 * @param string $formattedName The resource name of the task:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. Please see
 *                              {@see DataplexServiceClient::taskName()} for help formatting this field.
 */
function get_task_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Task $response */
        $response = $dataplexServiceClient->getTask($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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]');

    get_task_sample($formattedName);
}

getZone

Retrieves a zone resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::getZoneAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetZoneRequest

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
TypeDescription
Google\Cloud\Dataplex\V1\Zone
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\GetZoneRequest;
use Google\Cloud\Dataplex\V1\Zone;

/**
 * @param string $formattedName The resource name of the zone:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see
 *                              {@see DataplexServiceClient::zoneName()} for help formatting this field.
 */
function get_zone_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Zone $response */
        $response = $dataplexServiceClient->getZone($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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]');

    get_zone_sample($formattedName);
}

listAssetActions

Lists action resources in an asset.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listAssetActionsAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListAssetActionsRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Action;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\ListAssetActionsRequest;

/**
 * @param string $formattedParent The resource name of the parent asset:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see
 *                                {@see DataplexServiceClient::assetName()} for help formatting this field.
 */
function list_asset_actions_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Action $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 = DataplexServiceClient::assetName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[ZONE]',
        '[ASSET]'
    );

    list_asset_actions_sample($formattedParent);
}

listAssets

Lists asset resources in a zone.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listAssetsAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Asset;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\ListAssetsRequest;

/**
 * @param string $formattedParent The resource name of the parent zone:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see
 *                                {@see DataplexServiceClient::zoneName()} for help formatting this field.
 */
function list_assets_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Asset $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]');

    list_assets_sample($formattedParent);
}

listEnvironments

Lists environments under the given lake.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listEnvironmentsAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListEnvironmentsRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\Environment;
use Google\Cloud\Dataplex\V1\ListEnvironmentsRequest;

/**
 * @param string $formattedParent The resource name of the parent lake:
 *                                `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                                {@see DataplexServiceClient::lakeName()} for help formatting this field.
 */
function list_environments_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Environment $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');

    list_environments_sample($formattedParent);
}

listJobs

Lists Jobs under the given task.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listJobsAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListJobsRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\Job;
use Google\Cloud\Dataplex\V1\ListJobsRequest;

/**
 * @param string $formattedParent The resource name of the parent environment:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see
 *                                {@see DataplexServiceClient::taskName()} for help formatting this field.
 */
function list_jobs_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Job $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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]');

    list_jobs_sample($formattedParent);
}

listLakeActions

Lists action resources in a lake.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listLakeActionsAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListLakeActionsRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Action;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\ListLakeActionsRequest;

/**
 * @param string $formattedParent The resource name of the parent lake:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                                {@see DataplexServiceClient::lakeName()} for help formatting this field.
 */
function list_lake_actions_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Action $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');

    list_lake_actions_sample($formattedParent);
}

listLakes

Lists lake resources in a project and location.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listLakesAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListLakesRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\Lake;
use Google\Cloud\Dataplex\V1\ListLakesRequest;

/**
 * @param string $formattedParent The resource name of the lake location, of the form:
 *                                `projects/{project_number}/locations/{location_id}`
 *                                where `location_id` refers to a GCP region. Please see
 *                                {@see DataplexServiceClient::locationName()} for help formatting this field.
 */
function list_lakes_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Lake $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 = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]');

    list_lakes_sample($formattedParent);
}

listSessions

Lists session resources in an environment.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listSessionsAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListSessionsRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\ListSessionsRequest;
use Google\Cloud\Dataplex\V1\Session;

/**
 * @param string $formattedParent The resource name of the parent environment:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. Please see
 *                                {@see DataplexServiceClient::environmentName()} for help formatting this field.
 */
function list_sessions_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Session $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 = DataplexServiceClient::environmentName(
        '[PROJECT]',
        '[LOCATION]',
        '[LAKE]',
        '[ENVIRONMENT]'
    );

    list_sessions_sample($formattedParent);
}

listTasks

Lists tasks under the given lake.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listTasksAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListTasksRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\ListTasksRequest;
use Google\Cloud\Dataplex\V1\Task;

/**
 * @param string $formattedParent The resource name of the parent lake:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                                {@see DataplexServiceClient::lakeName()} for help formatting this field.
 */
function list_tasks_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Task $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');

    list_tasks_sample($formattedParent);
}

listZoneActions

Lists action resources in a zone.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listZoneActionsAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListZoneActionsRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Action;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\ListZoneActionsRequest;

/**
 * @param string $formattedParent The resource name of the parent zone:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see
 *                                {@see DataplexServiceClient::zoneName()} for help formatting this field.
 */
function list_zone_actions_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Action $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]');

    list_zone_actions_sample($formattedParent);
}

listZones

Lists zone resources in a lake.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listZonesAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListZonesRequest

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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\ListZonesRequest;
use Google\Cloud\Dataplex\V1\Zone;

/**
 * @param string $formattedParent The resource name of the parent lake:
 *                                `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see
 *                                {@see DataplexServiceClient::lakeName()} for help formatting this field.
 */
function list_zones_sample(string $formattedParent): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

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

        /** @var Zone $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]');

    list_zones_sample($formattedParent);
}

runTask

Run an on demand execution of a Task.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::runTaskAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\RunTaskRequest

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
TypeDescription
Google\Cloud\Dataplex\V1\RunTaskResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\RunTaskRequest;
use Google\Cloud\Dataplex\V1\RunTaskResponse;

/**
 * @param string $formattedName The resource name of the task:
 *                              `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see
 *                              {@see DataplexServiceClient::taskName()} for help formatting this field.
 */
function run_task_sample(string $formattedName): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var RunTaskResponse $response */
        $response = $dataplexServiceClient->runTask($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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]');

    run_task_sample($formattedName);
}

updateAsset

Updates an asset resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::updateAssetAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateAssetRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Asset;
use Google\Cloud\Dataplex\V1\Asset\ResourceSpec;
use Google\Cloud\Dataplex\V1\Asset\ResourceSpec\Type;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\UpdateAssetRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param int $assetResourceSpecType Immutable. Type of resource.
 */
function update_asset_sample(int $assetResourceSpecType): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $assetResourceSpec = (new ResourceSpec())
        ->setType($assetResourceSpecType);
    $asset = (new Asset())
        ->setResourceSpec($assetResourceSpec);
    $request = (new UpdateAssetRequest())
        ->setUpdateMask($updateMask)
        ->setAsset($asset);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->updateAsset($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Asset $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
{
    $assetResourceSpecType = Type::TYPE_UNSPECIFIED;

    update_asset_sample($assetResourceSpecType);
}

updateEnvironment

Update the environment resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::updateEnvironmentAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateEnvironmentRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\Environment;
use Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec;
use Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime;
use Google\Cloud\Dataplex\V1\UpdateEnvironmentRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $environmentInfrastructureSpecOsImageImageVersion Dataplex Image version.
 */
function update_environment_sample(string $environmentInfrastructureSpecOsImageImageVersion): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $environmentInfrastructureSpecOsImage = (new OsImageRuntime())
        ->setImageVersion($environmentInfrastructureSpecOsImageImageVersion);
    $environmentInfrastructureSpec = (new InfrastructureSpec())
        ->setOsImage($environmentInfrastructureSpecOsImage);
    $environment = (new Environment())
        ->setInfrastructureSpec($environmentInfrastructureSpec);
    $request = (new UpdateEnvironmentRequest())
        ->setUpdateMask($updateMask)
        ->setEnvironment($environment);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->updateEnvironment($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Environment $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
{
    $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]';

    update_environment_sample($environmentInfrastructureSpecOsImageImageVersion);
}

updateLake

Updates a lake resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::updateLakeAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateLakeRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\Lake;
use Google\Cloud\Dataplex\V1\UpdateLakeRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * 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_lake_sample(): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $lake = new Lake();
    $request = (new UpdateLakeRequest())
        ->setUpdateMask($updateMask)
        ->setLake($lake);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->updateLake($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Lake $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());
    }
}

updateTask

Update the task resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::updateTaskAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateTaskRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\Task;
use Google\Cloud\Dataplex\V1\Task\ExecutionSpec;
use Google\Cloud\Dataplex\V1\Task\TriggerSpec;
use Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type;
use Google\Cloud\Dataplex\V1\UpdateTaskRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param int    $taskTriggerSpecType             Immutable. Trigger type of the user-specified Task.
 * @param string $taskExecutionSpecServiceAccount Service account to use to execute a task.
 *                                                If not provided, the default Compute service account for the project is
 *                                                used.
 */
function update_task_sample(
    int $taskTriggerSpecType,
    string $taskExecutionSpecServiceAccount
): void {
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $taskTriggerSpec = (new TriggerSpec())
        ->setType($taskTriggerSpecType);
    $taskExecutionSpec = (new ExecutionSpec())
        ->setServiceAccount($taskExecutionSpecServiceAccount);
    $task = (new Task())
        ->setTriggerSpec($taskTriggerSpec)
        ->setExecutionSpec($taskExecutionSpec);
    $request = (new UpdateTaskRequest())
        ->setUpdateMask($updateMask)
        ->setTask($task);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->updateTask($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Task $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
{
    $taskTriggerSpecType = Type::TYPE_UNSPECIFIED;
    $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]';

    update_task_sample($taskTriggerSpecType, $taskExecutionSpecServiceAccount);
}

updateZone

Updates a zone resource.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::updateZoneAsync() .

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateZoneRequest

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
TypeDescription
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Dataplex\V1\UpdateZoneRequest;
use Google\Cloud\Dataplex\V1\Zone;
use Google\Cloud\Dataplex\V1\Zone\ResourceSpec;
use Google\Cloud\Dataplex\V1\Zone\ResourceSpec\LocationType;
use Google\Cloud\Dataplex\V1\Zone\Type;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param int $zoneType                     Immutable. The type of the zone.
 * @param int $zoneResourceSpecLocationType Immutable. The location type of the resources that are allowed
 *                                          to be attached to the assets within this zone.
 */
function update_zone_sample(int $zoneType, int $zoneResourceSpecLocationType): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $zoneResourceSpec = (new ResourceSpec())
        ->setLocationType($zoneResourceSpecLocationType);
    $zone = (new Zone())
        ->setType($zoneType)
        ->setResourceSpec($zoneResourceSpec);
    $request = (new UpdateZoneRequest())
        ->setUpdateMask($updateMask)
        ->setZone($zone);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $dataplexServiceClient->updateZone($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Zone $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
{
    $zoneType = Type::TYPE_UNSPECIFIED;
    $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED;

    update_zone_sample($zoneType, $zoneResourceSpecLocationType);
}

getIamPolicy

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::getIamPolicyAsync() .

Parameters
NameDescription
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
TypeDescription
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;

/**
 * @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.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $request = (new GetIamPolicyRequest())
        ->setResource($resource);

    // Call the API and handle any network failures.
    try {
        /** @var Policy $response */
        $response = $dataplexServiceClient->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);
}

setIamPolicy

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::setIamPolicyAsync() .

Parameters
NameDescription
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
TypeDescription
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;

/**
 * @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.
    $dataplexServiceClient = new DataplexServiceClient();

    // 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 = $dataplexServiceClient->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);
}

testIamPermissions

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::testIamPermissionsAsync() .

Parameters
NameDescription
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
TypeDescription
Google\Cloud\Iam\V1\TestIamPermissionsResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsResponse;

/**
 * @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.
    $dataplexServiceClient = new DataplexServiceClient();

    // 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 = $dataplexServiceClient->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);
}

getLocation

Gets information about a location.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::getLocationAsync() .

Parameters
NameDescription
request Google\Cloud\Location\GetLocationRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\Cloud\Location\Location
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;

/**
 * This sample has been automatically generated and should be regarded as a code
 * template only. It will require modifications to work:
 *  - It may require correct/in-range values for request initialization.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function get_location_sample(): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $request = new GetLocationRequest();

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

listLocations

Lists information about the supported locations for this service.

The async variant is Google\Cloud\Dataplex\V1\Client\DataplexServiceClient::listLocationsAsync() .

Parameters
NameDescription
request Google\Cloud\Location\ListLocationsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\DataplexServiceClient;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;

/**
 * This sample has been automatically generated and should be regarded as a code
 * template only. It will require modifications to work:
 *  - It may require correct/in-range values for request initialization.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function list_locations_sample(): void
{
    // Create a client.
    $dataplexServiceClient = new DataplexServiceClient();

    // Prepare the request message.
    $request = new ListLocationsRequest();

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

        /** @var Location $element */
        foreach ($response as $element) {
            printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

cancelJobAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CancelJobRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createAssetAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateAssetRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createEnvironmentAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateEnvironmentRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createLakeAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateLakeRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createTaskAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateTaskRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

createZoneAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\CreateZoneRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteAssetAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteAssetRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteEnvironmentAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteEnvironmentRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteLakeAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteLakeRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteTaskAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteTaskRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

deleteZoneAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\DeleteZoneRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getAssetAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetAssetRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getEnvironmentAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetEnvironmentRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getJobAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetJobRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getLakeAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetLakeRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getTaskAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetTaskRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getZoneAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\GetZoneRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listAssetActionsAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListAssetActionsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listAssetsAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListAssetsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listEnvironmentsAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListEnvironmentsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listJobsAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListJobsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listLakeActionsAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListLakeActionsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listLakesAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListLakesRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listSessionsAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListSessionsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listTasksAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListTasksRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listZoneActionsAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListZoneActionsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listZonesAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\ListZonesRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

runTaskAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\RunTaskRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateAssetAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateAssetRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateEnvironmentAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateEnvironmentRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateLakeAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateLakeRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateTaskAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateTaskRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

updateZoneAsync

Parameters
NameDescription
request Google\Cloud\Dataplex\V1\UpdateZoneRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getIamPolicyAsync

Parameters
NameDescription
request Google\Cloud\Iam\V1\GetIamPolicyRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

setIamPolicyAsync

Parameters
NameDescription
request Google\Cloud\Iam\V1\SetIamPolicyRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

testIamPermissionsAsync

Parameters
NameDescription
request Google\Cloud\Iam\V1\TestIamPermissionsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getLocationAsync

Parameters
NameDescription
request Google\Cloud\Location\GetLocationRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

listLocationsAsync

Parameters
NameDescription
request Google\Cloud\Location\ListLocationsRequest
optionalArgs = [] array
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface

getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

Returns
TypeDescription
Google\ApiCore\LongRunning\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
NameDescription
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
TypeDescription
Google\ApiCore\OperationResponse

static::assetName

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

Parameters
NameDescription
project string
location string
lake string
zone string
asset string
Returns
TypeDescription
stringThe formatted asset resource.

static::environmentName

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

Parameters
NameDescription
project string
location string
lake string
environment string
Returns
TypeDescription
stringThe formatted environment resource.

static::jobName

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

Parameters
NameDescription
project string
location string
lake string
task string
job string
Returns
TypeDescription
stringThe formatted job resource.

static::lakeName

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

Parameters
NameDescription
project string
location string
lake string
Returns
TypeDescription
stringThe formatted lake resource.

static::locationName

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

Parameters
NameDescription
project string
location string
Returns
TypeDescription
stringThe formatted location resource.

static::taskName

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

Parameters
NameDescription
project string
location string
lake string
task string
Returns
TypeDescription
stringThe formatted task resource.

static::zoneName

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

Parameters
NameDescription
project string
location string
lake string
zone string
Returns
TypeDescription
stringThe formatted zone 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

  • asset: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}
  • environment: projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}
  • job: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}
  • lake: projects/{project}/locations/{location}/lakes/{lake}
  • location: projects/{project}/locations/{location}
  • task: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}
  • zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}

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
NameDescription
formattedName string

The formatted name string

template string

Optional name of template to match

Returns
TypeDescription
arrayAn associative array from name component IDs to component values.