Google Cloud Dataplex V1 Client - Class CatalogServiceClient (1.0.0-RC1)

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

Service Description: The primary resources offered by this service are EntryGroups, EntryTypes, AspectTypes, Entry and Aspect which collectively allow a data administrator to organize, manage, secure and catalog data across their organization located across cloud projects in a variety of storage systems including Cloud Storage and BigQuery.

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

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

Namespace

Google \ Cloud \ Dataplex \ V1 \ Client

Methods

__construct

Constructor.

Parameters
Name Description
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

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

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored.

↳ credentialsConfig array

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

↳ disableRetries bool

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

↳ clientConfig string|array

Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder.

↳ transport string|TransportInterface

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

↳ transportConfig array

Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options.

↳ clientCertSource callable

A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS.

createAspectType

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateAspectTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\AspectType;
use Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\CreateAspectTypeRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                The resource name of the AspectType, of the form:
 *                                               projects/{project_number}/locations/{location_id}
 *                                               where `location_id` refers to a GCP region. Please see
 *                                               {@see CatalogServiceClient::locationName()} for help formatting this field.
 * @param string $aspectTypeId                   AspectType identifier.
 * @param string $aspectTypeMetadataTemplateName The name of the field.
 * @param string $aspectTypeMetadataTemplateType The datatype of this field. The following values are supported:
 *                                               Primitive types (string, integer, boolean, double, datetime); datetime
 *                                               must be of the format RFC3339 UTC "Zulu" (Examples:
 *                                               "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). Complex
 *                                               types (enum, array, map, record).
 */
function create_aspect_type_sample(
    string $formattedParent,
    string $aspectTypeId,
    string $aspectTypeMetadataTemplateName,
    string $aspectTypeMetadataTemplateType
): void {
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $aspectTypeMetadataTemplate = (new MetadataTemplate())
        ->setName($aspectTypeMetadataTemplateName)
        ->setType($aspectTypeMetadataTemplateType);
    $aspectType = (new AspectType())
        ->setMetadataTemplate($aspectTypeMetadataTemplate);
    $request = (new CreateAspectTypeRequest())
        ->setParent($formattedParent)
        ->setAspectTypeId($aspectTypeId)
        ->setAspectType($aspectType);

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

        if ($response->operationSucceeded()) {
            /** @var AspectType $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 = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $aspectTypeId = '[ASPECT_TYPE_ID]';
    $aspectTypeMetadataTemplateName = '[NAME]';
    $aspectTypeMetadataTemplateType = '[TYPE]';

    create_aspect_type_sample(
        $formattedParent,
        $aspectTypeId,
        $aspectTypeMetadataTemplateName,
        $aspectTypeMetadataTemplateType
    );
}

createEntry

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateEntryRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\Entry
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\CreateEntryRequest;
use Google\Cloud\Dataplex\V1\Entry;

/**
 * @param string $formattedParent The resource name of the parent Entry Group:
 *                                `projects/{project}/locations/{location}/entryGroups/{entry_group}`. Please see
 *                                {@see CatalogServiceClient::entryGroupName()} for help formatting this field.
 * @param string $entryId         Entry identifier. It has to be unique within an Entry Group.
 *
 *                                Entries corresponding to Google Cloud resources use Entry ID format based
 *                                on Full Resource Names
 *                                (https://cloud.google.com/apis/design/resource_names#full_resource_name).
 *                                The format is a Full Resource Name of the resource without the
 *                                prefix double slashes in the API Service Name part of Full Resource Name.
 *                                This allows retrieval of entries using their associated resource name.
 *
 *                                For example if the Full Resource Name of a resource is
 *                                `//library.googleapis.com/shelves/shelf1/books/book2`,
 *                                then the suggested entry_id is
 *                                `library.googleapis.com/shelves/shelf1/books/book2`.
 *
 *                                It is also suggested to follow the same convention for entries
 *                                corresponding to resources from other providers or systems than Google
 *                                Cloud.
 *
 *                                The maximum size of the field is 4000 characters.
 * @param string $entryEntryType  Immutable. The resource name of the EntryType used to create this
 *                                Entry.
 */
function create_entry_sample(
    string $formattedParent,
    string $entryId,
    string $entryEntryType
): void {
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $entry = (new Entry())
        ->setEntryType($entryEntryType);
    $request = (new CreateEntryRequest())
        ->setParent($formattedParent)
        ->setEntryId($entryId)
        ->setEntry($entry);

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

/**
 * Helper to execute the sample.
 *
 * This sample has been automatically generated and should be regarded as a code
 * template only. It will require modifications to work:
 *  - It may require correct/in-range values for request initialization.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]');
    $entryId = '[ENTRY_ID]';
    $entryEntryType = '[ENTRY_TYPE]';

    create_entry_sample($formattedParent, $entryId, $entryEntryType);
}

createEntryGroup

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateEntryGroupRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\CreateEntryGroupRequest;
use Google\Cloud\Dataplex\V1\EntryGroup;
use Google\Rpc\Status;

/**
 * @param string $formattedParent The resource name of the entryGroup, of the form:
 *                                projects/{project_number}/locations/{location_id}
 *                                where `location_id` refers to a GCP region. Please see
 *                                {@see CatalogServiceClient::locationName()} for help formatting this field.
 * @param string $entryGroupId    EntryGroup identifier.
 */
function create_entry_group_sample(string $formattedParent, string $entryGroupId): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $entryGroup = new EntryGroup();
    $request = (new CreateEntryGroupRequest())
        ->setParent($formattedParent)
        ->setEntryGroupId($entryGroupId)
        ->setEntryGroup($entryGroup);

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

        if ($response->operationSucceeded()) {
            /** @var EntryGroup $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 = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $entryGroupId = '[ENTRY_GROUP_ID]';

    create_entry_group_sample($formattedParent, $entryGroupId);
}

createEntryType

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateEntryTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\CreateEntryTypeRequest;
use Google\Cloud\Dataplex\V1\EntryType;
use Google\Rpc\Status;

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

    // Prepare the request message.
    $entryType = new EntryType();
    $request = (new CreateEntryTypeRequest())
        ->setParent($formattedParent)
        ->setEntryTypeId($entryTypeId)
        ->setEntryType($entryType);

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

        if ($response->operationSucceeded()) {
            /** @var EntryType $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 = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $entryTypeId = '[ENTRY_TYPE_ID]';

    create_entry_type_sample($formattedParent, $entryTypeId);
}

deleteAspectType

Deletes a AspectType resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::deleteAspectTypeAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteAspectTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\DeleteAspectTypeRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the AspectType:
 *                              `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. Please see
 *                              {@see CatalogServiceClient::aspectTypeName()} for help formatting this field.
 */
function delete_aspect_type_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $catalogServiceClient->deleteAspectType($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 = CatalogServiceClient::aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]');

    delete_aspect_type_sample($formattedName);
}

deleteEntry

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteEntryRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\Entry
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\DeleteEntryRequest;
use Google\Cloud\Dataplex\V1\Entry;

/**
 * @param string $formattedName The resource name of the Entry:
 *                              `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. Please see
 *                              {@see CatalogServiceClient::entryName()} for help formatting this field.
 */
function delete_entry_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Entry $response */
        $response = $catalogServiceClient->deleteEntry($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 = CatalogServiceClient::entryName(
        '[PROJECT]',
        '[LOCATION]',
        '[ENTRY_GROUP]',
        '[ENTRY]'
    );

    delete_entry_sample($formattedName);
}

deleteEntryGroup

Deletes a EntryGroup resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::deleteEntryGroupAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteEntryGroupRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\DeleteEntryGroupRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the EntryGroup:
 *                              `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. Please see
 *                              {@see CatalogServiceClient::entryGroupName()} for help formatting this field.
 */
function delete_entry_group_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $catalogServiceClient->deleteEntryGroup($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 = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]');

    delete_entry_group_sample($formattedName);
}

deleteEntryType

Deletes a EntryType resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::deleteEntryTypeAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteEntryTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\DeleteEntryTypeRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the EntryType:
 *                              `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. Please see
 *                              {@see CatalogServiceClient::entryTypeName()} for help formatting this field.
 */
function delete_entry_type_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $catalogServiceClient->deleteEntryType($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 = CatalogServiceClient::entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]');

    delete_entry_type_sample($formattedName);
}

getAspectType

Retrieves a AspectType resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::getAspectTypeAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetAspectTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\AspectType
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\AspectType;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\GetAspectTypeRequest;

/**
 * @param string $formattedName The resource name of the AspectType:
 *                              `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. Please see
 *                              {@see CatalogServiceClient::aspectTypeName()} for help formatting this field.
 */
function get_aspect_type_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var AspectType $response */
        $response = $catalogServiceClient->getAspectType($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 = CatalogServiceClient::aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]');

    get_aspect_type_sample($formattedName);
}

getEntry

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetEntryRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\Entry
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\Entry;
use Google\Cloud\Dataplex\V1\GetEntryRequest;

/**
 * @param string $formattedName The resource name of the Entry:
 *                              `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. Please see
 *                              {@see CatalogServiceClient::entryName()} for help formatting this field.
 */
function get_entry_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Entry $response */
        $response = $catalogServiceClient->getEntry($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 = CatalogServiceClient::entryName(
        '[PROJECT]',
        '[LOCATION]',
        '[ENTRY_GROUP]',
        '[ENTRY]'
    );

    get_entry_sample($formattedName);
}

getEntryGroup

Retrieves a EntryGroup resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::getEntryGroupAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetEntryGroupRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\EntryGroup
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\EntryGroup;
use Google\Cloud\Dataplex\V1\GetEntryGroupRequest;

/**
 * @param string $formattedName The resource name of the EntryGroup:
 *                              `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. Please see
 *                              {@see CatalogServiceClient::entryGroupName()} for help formatting this field.
 */
function get_entry_group_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var EntryGroup $response */
        $response = $catalogServiceClient->getEntryGroup($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 = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]');

    get_entry_group_sample($formattedName);
}

getEntryType

Retrieves a EntryType resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::getEntryTypeAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetEntryTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\EntryType
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\EntryType;
use Google\Cloud\Dataplex\V1\GetEntryTypeRequest;

/**
 * @param string $formattedName The resource name of the EntryType:
 *                              `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. Please see
 *                              {@see CatalogServiceClient::entryTypeName()} for help formatting this field.
 */
function get_entry_type_sample(string $formattedName): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var EntryType $response */
        $response = $catalogServiceClient->getEntryType($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 = CatalogServiceClient::entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]');

    get_entry_type_sample($formattedName);
}

listAspectTypes

Lists AspectType resources in a project and location.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::listAspectTypesAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListAspectTypesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\AspectType;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\ListAspectTypesRequest;

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

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

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

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

    list_aspect_types_sample($formattedParent);
}

listEntries

Lists entries within an entry group.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::listEntriesAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListEntriesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\Entry;
use Google\Cloud\Dataplex\V1\ListEntriesRequest;

/**
 * @param string $formattedParent The resource name of the parent Entry Group:
 *                                `projects/{project}/locations/{location}/entryGroups/{entry_group}`. Please see
 *                                {@see CatalogServiceClient::entryGroupName()} for help formatting this field.
 */
function list_entries_sample(string $formattedParent): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

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

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

        /** @var Entry $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 = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]');

    list_entries_sample($formattedParent);
}

listEntryGroups

Lists EntryGroup resources in a project and location.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::listEntryGroupsAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListEntryGroupsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\EntryGroup;
use Google\Cloud\Dataplex\V1\ListEntryGroupsRequest;

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

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

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

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

    list_entry_groups_sample($formattedParent);
}

listEntryTypes

Lists EntryType resources in a project and location.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::listEntryTypesAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListEntryTypesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\EntryType;
use Google\Cloud\Dataplex\V1\ListEntryTypesRequest;

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

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

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

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

    list_entry_types_sample($formattedParent);
}

lookupEntry

Looks up a single entry.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::lookupEntryAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\LookupEntryRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\Entry
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\Entry;
use Google\Cloud\Dataplex\V1\LookupEntryRequest;

/**
 * @param string $name           The project to which the request should be attributed in the
 *                               following form: `projects/{project}/locations/{location}`.
 * @param string $formattedEntry The resource name of the Entry:
 *                               `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. Please see
 *                               {@see CatalogServiceClient::entryName()} for help formatting this field.
 */
function lookup_entry_sample(string $name, string $formattedEntry): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $request = (new LookupEntryRequest())
        ->setName($name)
        ->setEntry($formattedEntry);

    // Call the API and handle any network failures.
    try {
        /** @var Entry $response */
        $response = $catalogServiceClient->lookupEntry($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
{
    $name = '[NAME]';
    $formattedEntry = CatalogServiceClient::entryName(
        '[PROJECT]',
        '[LOCATION]',
        '[ENTRY_GROUP]',
        '[ENTRY]'
    );

    lookup_entry_sample($name, $formattedEntry);
}

searchEntries

Searches for entries matching given query and scope.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::searchEntriesAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\SearchEntriesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\SearchEntriesRequest;
use Google\Cloud\Dataplex\V1\SearchEntriesResult;

/**
 * @param string $name  The project to which the request should be attributed in the
 *                      following form: `projects/{project}/locations/{location}`.
 * @param string $query The query against which entries in scope should be matched.
 */
function search_entries_sample(string $name, string $query): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $request = (new SearchEntriesRequest())
        ->setName($name)
        ->setQuery($query);

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

        /** @var SearchEntriesResult $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
{
    $name = '[NAME]';
    $query = '[QUERY]';

    search_entries_sample($name, $query);
}

updateAspectType

Updates a AspectType resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::updateAspectTypeAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateAspectTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\AspectType;
use Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\UpdateAspectTypeRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $aspectTypeMetadataTemplateName The name of the field.
 * @param string $aspectTypeMetadataTemplateType The datatype of this field. The following values are supported:
 *                                               Primitive types (string, integer, boolean, double, datetime); datetime
 *                                               must be of the format RFC3339 UTC "Zulu" (Examples:
 *                                               "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). Complex
 *                                               types (enum, array, map, record).
 */
function update_aspect_type_sample(
    string $aspectTypeMetadataTemplateName,
    string $aspectTypeMetadataTemplateType
): void {
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $aspectTypeMetadataTemplate = (new MetadataTemplate())
        ->setName($aspectTypeMetadataTemplateName)
        ->setType($aspectTypeMetadataTemplateType);
    $aspectType = (new AspectType())
        ->setMetadataTemplate($aspectTypeMetadataTemplate);
    $updateMask = new FieldMask();
    $request = (new UpdateAspectTypeRequest())
        ->setAspectType($aspectType)
        ->setUpdateMask($updateMask);

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

        if ($response->operationSucceeded()) {
            /** @var AspectType $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
{
    $aspectTypeMetadataTemplateName = '[NAME]';
    $aspectTypeMetadataTemplateType = '[TYPE]';

    update_aspect_type_sample($aspectTypeMetadataTemplateName, $aspectTypeMetadataTemplateType);
}

updateEntry

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateEntryRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Dataplex\V1\Entry
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\Entry;
use Google\Cloud\Dataplex\V1\UpdateEntryRequest;

/**
 * @param string $entryEntryType Immutable. The resource name of the EntryType used to create this
 *                               Entry.
 */
function update_entry_sample(string $entryEntryType): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $entry = (new Entry())
        ->setEntryType($entryEntryType);
    $request = (new UpdateEntryRequest())
        ->setEntry($entry);

    // Call the API and handle any network failures.
    try {
        /** @var Entry $response */
        $response = $catalogServiceClient->updateEntry($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
{
    $entryEntryType = '[ENTRY_TYPE]';

    update_entry_sample($entryEntryType);
}

updateEntryGroup

Updates a EntryGroup resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::updateEntryGroupAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateEntryGroupRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\EntryGroup;
use Google\Cloud\Dataplex\V1\UpdateEntryGroupRequest;
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_entry_group_sample(): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $entryGroup = new EntryGroup();
    $updateMask = new FieldMask();
    $request = (new UpdateEntryGroupRequest())
        ->setEntryGroup($entryGroup)
        ->setUpdateMask($updateMask);

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

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

updateEntryType

Updates a EntryType resource.

The async variant is Google\Cloud\Dataplex\V1\Client\CatalogServiceClient::updateEntryTypeAsync() .

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateEntryTypeRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\EntryType;
use Google\Cloud\Dataplex\V1\UpdateEntryTypeRequest;
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_entry_type_sample(): void
{
    // Create a client.
    $catalogServiceClient = new CatalogServiceClient();

    // Prepare the request message.
    $entryType = new EntryType();
    $updateMask = new FieldMask();
    $request = (new UpdateEntryTypeRequest())
        ->setEntryType($entryType)
        ->setUpdateMask($updateMask);

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

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

getIamPolicy

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

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

Parameters
Name Description
request Google\Cloud\Iam\V1\GetIamPolicyRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
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.
    $catalogServiceClient = new CatalogServiceClient();

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

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

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

    get_iam_policy_sample($resource);
}

setIamPolicy

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

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

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

Parameters
Name Description
request Google\Cloud\Iam\V1\SetIamPolicyRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
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.
    $catalogServiceClient = new CatalogServiceClient();

    // 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 = $catalogServiceClient->setIamPolicy($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    set_iam_policy_sample($resource);
}

testIamPermissions

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

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

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

Parameters
Name Description
request Google\Cloud\Iam\V1\TestIamPermissionsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Iam\V1\TestIamPermissionsResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
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.
    $catalogServiceClient = new CatalogServiceClient();

    // 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 = $catalogServiceClient->testIamPermissions($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample has been automatically generated and should be regarded as a code
 * template only. It will require modifications to work:
 *  - It may require correct/in-range values for request initialization.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $resource = '[RESOURCE]';
    $permissionsElement = '[PERMISSIONS]';

    test_iam_permissions_sample($resource, $permissionsElement);
}

getLocation

Gets information about a location.

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

Parameters
Name Description
request Google\Cloud\Location\GetLocationRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Location\Location
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
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.
    $catalogServiceClient = new CatalogServiceClient();

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

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

listLocations

Lists information about the supported locations for this service.

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

Parameters
Name Description
request Google\Cloud\Location\ListLocationsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
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.
    $catalogServiceClient = new CatalogServiceClient();

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

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

createAspectTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateAspectTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

createEntryAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateEntryRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

createEntryGroupAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateEntryGroupRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

createEntryTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\CreateEntryTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

deleteAspectTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteAspectTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

deleteEntryAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteEntryRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

deleteEntryGroupAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteEntryGroupRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

deleteEntryTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\DeleteEntryTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

getAspectTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetAspectTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

getEntryAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetEntryRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

getEntryGroupAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetEntryGroupRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

getEntryTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\GetEntryTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

listAspectTypesAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListAspectTypesRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

listEntriesAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListEntriesRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

listEntryGroupsAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListEntryGroupsRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

listEntryTypesAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\ListEntryTypesRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

lookupEntryAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\LookupEntryRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

searchEntriesAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\SearchEntriesRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

updateAspectTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateAspectTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

updateEntryAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateEntryRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

updateEntryGroupAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateEntryGroupRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

updateEntryTypeAsync

Parameters
Name Description
request Google\Cloud\Dataplex\V1\UpdateEntryTypeRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

getIamPolicyAsync

Parameters
Name Description
request Google\Cloud\Iam\V1\GetIamPolicyRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

setIamPolicyAsync

Parameters
Name Description
request Google\Cloud\Iam\V1\SetIamPolicyRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

testIamPermissionsAsync

Parameters
Name Description
request Google\Cloud\Iam\V1\TestIamPermissionsRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

getLocationAsync

Parameters
Name Description
request Google\Cloud\Location\GetLocationRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

listLocationsAsync

Parameters
Name Description
request Google\Cloud\Location\ListLocationsRequest
optionalArgs = [] array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

getOperationsClient

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

Returns
Type Description
Google\LongRunning\Client\OperationsClient

resumeOperation

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

Parameters
Name Description
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
Type Description
Google\ApiCore\OperationResponse

static::aspectTypeName

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

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

static::entryName

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

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

static::entryGroupName

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

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

static::entryTypeName

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

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

static::locationName

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

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

static::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

  • aspectType: projects/{project}/locations/{location}/aspectTypes/{aspect_type}
  • entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}
  • entryGroup: projects/{project}/locations/{location}/entryGroups/{entry_group}
  • entryType: projects/{project}/locations/{location}/entryTypes/{entry_type}
  • location: projects/{project}/locations/{location}

The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.

Parameters
Name Description
formattedName string

The formatted name string

template string

Optional name of template to match

Returns
Type Description
array An associative array from name component IDs to component values.