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, and Entries. They collectively let data administrators organize, manage, secure, and catalog data located across cloud projects in their organization 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 \ ClientMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
options |
array
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() . |
↳ disableRetries |
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to |
↳ clientConfig |
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
↳ transport |
string|TransportInterface
The transport used for executing network requests. May be either the string |
↳ transportConfig |
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options. |
↳ clientCertSource |
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
cancelMetadataJob
Cancels a metadata job.
If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.
The async variant is CatalogServiceClient::cancelMetadataJobAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CancelMetadataJobRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\CancelMetadataJobRequest;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
/**
* @param string $formattedName The resource name of the job, in the format
* `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`
* Please see {@see CatalogServiceClient::metadataJobName()} for help formatting this field.
*/
function cancel_metadata_job_sample(string $formattedName): void
{
// Create a client.
$catalogServiceClient = new CatalogServiceClient();
// Prepare the request message.
$request = (new CancelMetadataJobRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$catalogServiceClient->cancelMetadataJob($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 = CatalogServiceClient::metadataJobName('[PROJECT]', '[LOCATION]', '[METADATAJOB]');
cancel_metadata_job_sample($formattedName);
}
createAspectType
Creates an AspectType.
The async variant is CatalogServiceClient::createAspectTypeAsync() .
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 |
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 Google Cloud 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. 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
Creates an Entry.
The async variant is CatalogServiceClient::createEntryAsync() .
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 |
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 an 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 the 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 providers or systems other than Google
* Cloud.
*
* The maximum size of the field is 4000 characters.
* @param string $entryEntryType Immutable. The relative resource name of the entry type that was
* used to create this entry, in the format
* `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
*/
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
Creates an EntryGroup.
The async variant is CatalogServiceClient::createEntryGroupAsync() .
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 |
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
Creates an EntryType.
The async variant is CatalogServiceClient::createEntryTypeAsync() .
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 |
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 Google Cloud 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);
}
createMetadataJob
Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex.
The async variant is CatalogServiceClient::createMetadataJobAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CreateMetadataJobRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\CreateMetadataJobRequest;
use Google\Cloud\Dataplex\V1\MetadataJob;
use Google\Cloud\Dataplex\V1\MetadataJob\Type;
use Google\Rpc\Status;
/**
* @param string $formattedParent The resource name of the parent location, in the format
* `projects/{project_id_or_number}/locations/{location_id}`
* Please see {@see CatalogServiceClient::locationName()} for help formatting this field.
* @param int $metadataJobType Metadata job type.
*/
function create_metadata_job_sample(string $formattedParent, int $metadataJobType): void
{
// Create a client.
$catalogServiceClient = new CatalogServiceClient();
// Prepare the request message.
$metadataJob = (new MetadataJob())
->setType($metadataJobType);
$request = (new CreateMetadataJobRequest())
->setParent($formattedParent)
->setMetadataJob($metadataJob);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $catalogServiceClient->createMetadataJob($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var MetadataJob $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]');
$metadataJobType = Type::TYPE_UNSPECIFIED;
create_metadata_job_sample($formattedParent, $metadataJobType);
}
deleteAspectType
Deletes an AspectType.
The async variant is 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 |
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
Deletes an Entry.
The async variant is CatalogServiceClient::deleteEntryAsync() .
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 |
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 an EntryGroup.
The async variant is 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 |
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 an EntryType.
The async variant is 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 |
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
Gets an AspectType.
The async variant is 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 |
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
Gets an Entry.
Caution: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see Changes to BigQuery metadata stored in Dataplex Catalog.
The async variant is CatalogServiceClient::getEntryAsync() .
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 |
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
Gets an EntryGroup.
The async variant is 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 |
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
Gets an EntryType.
The async variant is 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 |
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);
}
getMetadataJob
Gets a metadata job.
The async variant is CatalogServiceClient::getMetadataJobAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\GetMetadataJobRequest
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\MetadataJob |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\GetMetadataJobRequest;
use Google\Cloud\Dataplex\V1\MetadataJob;
/**
* @param string $formattedName The resource name of the metadata job, in the format
* `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. Please see
* {@see CatalogServiceClient::metadataJobName()} for help formatting this field.
*/
function get_metadata_job_sample(string $formattedName): void
{
// Create a client.
$catalogServiceClient = new CatalogServiceClient();
// Prepare the request message.
$request = (new GetMetadataJobRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var MetadataJob $response */
$response = $catalogServiceClient->getMetadataJob($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::metadataJobName('[PROJECT]', '[LOCATION]', '[METADATAJOB]');
get_metadata_job_sample($formattedName);
}
listAspectTypes
Lists AspectType resources in a project and location.
The async variant is 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 |
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 Google Cloud 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 EntryGroup.
The async variant is 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 |
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 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 |
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 Google Cloud 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 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 |
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 Google Cloud 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);
}
listMetadataJobs
Lists metadata jobs.
The async variant is CatalogServiceClient::listMetadataJobsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\ListMetadataJobsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Dataplex\V1\Client\CatalogServiceClient;
use Google\Cloud\Dataplex\V1\ListMetadataJobsRequest;
use Google\Cloud\Dataplex\V1\MetadataJob;
/**
* @param string $formattedParent The resource name of the parent location, in the format
* `projects/{project_id_or_number}/locations/{location_id}`
* Please see {@see CatalogServiceClient::locationName()} for help formatting this field.
*/
function list_metadata_jobs_sample(string $formattedParent): void
{
// Create a client.
$catalogServiceClient = new CatalogServiceClient();
// Prepare the request message.
$request = (new ListMetadataJobsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $catalogServiceClient->listMetadataJobs($request);
/** @var MetadataJob $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_metadata_jobs_sample($formattedParent);
}
lookupEntry
Looks up a single Entry by name using the permission on the source system.
Caution: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see Changes to BigQuery metadata stored in Dataplex Catalog.
The async variant is 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 |
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 the given query and scope.
The async variant is 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 |
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 $formattedName The project to which the request should be attributed in the
* following form: `projects/{project}/locations/{location}`. Please see
* {@see CatalogServiceClient::locationName()} for help formatting this field.
* @param string $query The query against which entries in scope should be matched.
*/
function search_entries_sample(string $formattedName, string $query): void
{
// Create a client.
$catalogServiceClient = new CatalogServiceClient();
// Prepare the request message.
$request = (new SearchEntriesRequest())
->setName($formattedName)
->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
{
$formattedName = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]');
$query = '[QUERY]';
search_entries_sample($formattedName, $query);
}
updateAspectType
Updates an AspectType.
The async variant is 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 |
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. 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
Updates an Entry.
The async variant is CatalogServiceClient::updateEntryAsync() .
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 |
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 relative resource name of the entry type that was
* used to create this entry, in the format
* `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
*/
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 an EntryGroup.
The async variant is 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 |
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 an EntryType.
The async variant is 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 |
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 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 |
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 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 |
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 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 |
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 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 |
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 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 |
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());
}
}
cancelMetadataJobAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CancelMetadataJobRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
createAspectTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CreateAspectTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createEntryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CreateEntryRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Entry> |
createEntryGroupAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CreateEntryGroupRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createEntryTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CreateEntryTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createMetadataJobAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\CreateMetadataJobRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteAspectTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\DeleteAspectTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteEntryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\DeleteEntryRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Entry> |
deleteEntryGroupAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\DeleteEntryGroupRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteEntryTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\DeleteEntryTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
getAspectTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\GetAspectTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\AspectType> |
getEntryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\GetEntryRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Entry> |
getEntryGroupAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\GetEntryGroupRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\EntryGroup> |
getEntryTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\GetEntryTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\EntryType> |
getMetadataJobAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\GetMetadataJobRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\MetadataJob> |
listAspectTypesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\ListAspectTypesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEntriesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\ListEntriesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEntryGroupsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\ListEntryGroupsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEntryTypesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\ListEntryTypesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listMetadataJobsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\ListMetadataJobsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
lookupEntryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\LookupEntryRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Entry> |
searchEntriesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\SearchEntriesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
updateAspectTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\UpdateAspectTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updateEntryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\UpdateEntryRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Dataplex\V1\Entry> |
updateEntryGroupAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\UpdateEntryGroupRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updateEntryTypeAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataplex\V1\UpdateEntryTypeRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
getIamPolicyAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\GetIamPolicyRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\Policy> |
setIamPolicyAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\SetIamPolicyRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\Policy> |
testIamPermissionsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Iam\V1\TestIamPermissionsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Iam\V1\TestIamPermissionsResponse> |
getLocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location> |
listLocationsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
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::metadataJobName
Formats a string containing the fully-qualified path to represent a metadata_job resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
metadataJob |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted metadata_job 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}
- metadataJob: projects/{project}/locations/{location}/metadataJobs/{metadataJob}
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. |