Google Cloud Dataplex V1 Client - Class DataplexServiceClient (1.11.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 resourcesoffered by this service are Lakes, Zones and Assets which collectively allowa data administrator to organize, manage, secure and catalog data acrosstheir organization located across cloud projects in a variety of storagesystems including Cloud Storage and BigQuery.

This class provides the ability to make remote calls to the backing service through methodcalls that map to API methods.

Many parameters require resource names to be formatted in a particular way. Toassist with these names, this class includes a format method for each type ofname, and additionally a parseName method to extract the individual identifierscontained within formatted names that are returned by the API.

Namespace

Google \ Cloud \ Dataplex \ V1 \ Client

Methods

__construct

Constructor.

Parameters
NameDescription
optionsarray|Google\ApiCore\Options\ClientOptions

Optional. Options for configuring the service API wrapper.

↳ apiEndpointstring

The address of the API remote host. May optionally include the port, formatted as "

↳ credentialsFetchAuthTokenInterface|CredentialsWrapper

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

↳ credentialsConfigarray

Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, seeGoogle\ApiCore\CredentialsWrapper::build() .

↳ disableRetriesbool

Determines whether or not retries defined by the client configuration should be disabled. Defaults tofalse.

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

↳ transportstring|TransportInterface

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

↳ transportConfigarray

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 theGoogle\ApiCore\Transport\GrpcTransport::build() andGoogle\ApiCore\Transport\RestTransport::build() methods for the supported options.

↳ clientCertSourcecallable

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.

↳ loggerfalse|LoggerInterface

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

↳ universeDomainstring

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

cancelJob

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CancelJobRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::createAssetAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateAssetRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Asset>
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 isDataplexServiceClient::createEnvironmentAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateEnvironmentRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Environment>
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 Universal Catalog 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 isDataplexServiceClient::createLakeAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateLakeRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Lake>
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 Google Cloud 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 isDataplexServiceClient::createTaskAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateTaskRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Task>
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 isDataplexServiceClient::createZoneAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateZoneRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Zone>
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 isDataplexServiceClient::deleteAssetAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteAssetRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<null>
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 beendeleted before environment deletion can be initiated.

The async variant isDataplexServiceClient::deleteEnvironmentAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteEnvironmentRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<null>
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 beforethe lake can be deleted.

The async variant isDataplexServiceClient::deleteLakeAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteLakeRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<null>
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 isDataplexServiceClient::deleteTaskAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteTaskRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<null>
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 beforethe zone can be deleted.

The async variant isDataplexServiceClient::deleteZoneAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteZoneRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<null>
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 isDataplexServiceClient::getAssetAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetAssetRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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

Get environment resource.

The async variant isDataplexServiceClient::getEnvironmentAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetEnvironmentRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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

Get job resource.

The async variant isDataplexServiceClient::getJobAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetJobRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::getLakeAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetLakeRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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

Get task resource.

The async variant isDataplexServiceClient::getTaskAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetTaskRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::getZoneAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetZoneRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listAssetActionsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListAssetActionsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listAssetsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListAssetsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listEnvironmentsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListEnvironmentsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listJobsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListJobsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listLakeActionsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListLakeActionsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listLakesAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListLakesRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 Google Cloud 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 isDataplexServiceClient::listSessionsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListSessionsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listTasksAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListTasksRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listZoneActionsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListZoneActionsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listZonesAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListZonesRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::runTaskAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\RunTaskRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::updateAssetAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateAssetRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Asset>
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 isDataplexServiceClient::updateEnvironmentAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateEnvironmentRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Environment>
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 Universal Catalog 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 isDataplexServiceClient::updateLakeAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateLakeRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Lake>
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 isDataplexServiceClient::updateTaskAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateTaskRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Task>
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 isDataplexServiceClient::updateZoneAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateZoneRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\OperationResponse<Google\Cloud\Dataplex\V1\Zone>
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 policyif the resource exists and does not have a policy set.

The async variant isDataplexServiceClient::getIamPolicyAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Iam\V1\GetIamPolicyRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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. Replacesany existing policy.

Can returnNOT_FOUND,INVALID_ARGUMENT, andPERMISSION_DENIEDerrors.

The async variant isDataplexServiceClient::setIamPolicyAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Iam\V1\SetIamPolicyRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 theresource does not exist, this will return an empty set ofpermissions, not aNOT_FOUND error.

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

The async variant isDataplexServiceClient::testIamPermissionsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Iam\V1\TestIamPermissionsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::getLocationAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Location\GetLocationRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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 isDataplexServiceClient::listLocationsAsync() .

Parameters
NameDescription
requestGoogle\Cloud\Location\ListLocationsRequest

A request to house fields associated with the call.

callOptionsarray

Optional.

↳ retrySettingsRetrySettings|array

Retry settings to use for this call. Can be aGoogle\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation onGoogle\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
requestGoogle\Cloud\Dataplex\V1\CancelJobRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<void>

createAssetAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateAssetRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createEnvironmentAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateEnvironmentRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createLakeAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateLakeRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createTaskAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateTaskRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createZoneAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\CreateZoneRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteAssetAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteAssetRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteEnvironmentAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteEnvironmentRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteLakeAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteLakeRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteTaskAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteTaskRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteZoneAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\DeleteZoneRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

getAssetAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetAssetRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Asset>

getEnvironmentAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetEnvironmentRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Environment>

getJobAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetJobRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Job>

getLakeAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetLakeRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Lake>

getTaskAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetTaskRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Task>

getZoneAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\GetZoneRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Zone>

listAssetActionsAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListAssetActionsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listAssetsAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListAssetsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listEnvironmentsAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListEnvironmentsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listJobsAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListJobsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listLakeActionsAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListLakeActionsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listLakesAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListLakesRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listSessionsAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListSessionsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listTasksAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListTasksRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listZoneActionsAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListZoneActionsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listZonesAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\ListZonesRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

runTaskAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\RunTaskRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\RunTaskResponse>

updateAssetAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateAssetRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateEnvironmentAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateEnvironmentRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateLakeAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateLakeRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateTaskAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateTaskRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateZoneAsync

Parameters
NameDescription
requestGoogle\Cloud\Dataplex\V1\UpdateZoneRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

getIamPolicyAsync

Parameters
NameDescription
requestGoogle\Cloud\Iam\V1\GetIamPolicyRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\Policy>

setIamPolicyAsync

Parameters
NameDescription
requestGoogle\Cloud\Iam\V1\SetIamPolicyRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\Policy>

testIamPermissionsAsync

Parameters
NameDescription
requestGoogle\Cloud\Iam\V1\TestIamPermissionsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\TestIamPermissionsResponse>

getLocationAsync

Parameters
NameDescription
requestGoogle\Cloud\Location\GetLocationRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location>

listLocationsAsync

Parameters
NameDescription
requestGoogle\Cloud\Location\ListLocationsRequest
optionalArgsarray
Returns
TypeDescription
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

getOperationsClient

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

Returns
TypeDescription
Google\LongRunning\Client\OperationsClient

resumeOperation

Resume an existing long running operation that was previously started by a longrunning API method. If $methodName is not provided, or does not match a longrunning API method, then the operation can still be resumed, but theOperationResponse object will not deserialize the final response.

Parameters
NameDescription
operationNamestring

The name of the long running operation

methodNamestring

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

Parameters
NameDescription
projectstring
locationstring
lakestring
zonestring
assetstring
Returns
TypeDescription
stringThe formatted asset resource.

static::environmentName

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

Parameters
NameDescription
projectstring
locationstring
lakestring
environmentstring
Returns
TypeDescription
stringThe formatted environment resource.

static::jobName

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

Parameters
NameDescription
projectstring
locationstring
lakestring
taskstring
jobstring
Returns
TypeDescription
stringThe formatted job resource.

static::lakeName

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

Parameters
NameDescription
projectstring
locationstring
lakestring
Returns
TypeDescription
stringThe formatted lake resource.

static::locationName

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

Parameters
NameDescription
projectstring
locationstring
Returns
TypeDescription
stringThe formatted location resource.

static::taskName

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

Parameters
NameDescription
projectstring
locationstring
lakestring
taskstring
Returns
TypeDescription
stringThe formatted task resource.

static::zoneName

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

Parameters
NameDescription
projectstring
locationstring
lakestring
zonestring
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 isprovided, or if the $template argument does not match one of the templateslisted, then parseName will check each of the supported templates, and returnthe first match.

Parameters
NameDescription
formattedNamestring

The formatted name string

template?string

Optional name of template to match

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

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-10 UTC.