Google Cloud Apigee Registry V1 Client - Class RegistryClient (0.3.2)

Reference documentation and code samples for the Google Cloud Apigee Registry V1 Client class RegistryClient.

Service Description: The Registry service allows teams to manage descriptions of APIs.

This class is currently experimental and may be subject to changes.

Namespace

Google \ Cloud \ ApigeeRegistry \ V1 \ Client

Methods

__construct

Constructor.

Parameters
NameDescription
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

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

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

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

↳ credentialsConfig array

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

↳ disableRetries bool

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

↳ clientConfig string|array

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

↳ transport string|TransportInterface

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

↳ transportConfig array

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

↳ clientCertSource callable

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

createApi

Creates a specified API.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::createApiAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\CreateApiRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\Api
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Api;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\CreateApiRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of APIs.
 *                                Format: `projects/*/locations/*`
 *                                Please see {@see RegistryClient::locationName()} for help formatting this field.
 * @param string $apiId           The ID to use for the API, which will become the final component of
 *                                the API's resource name.
 *
 *                                This value should be 4-63 characters, and valid characters
 *                                are /[a-z][0-9]-/.
 *
 *                                Following AIP-162, IDs must not have the form of a UUID.
 */
function create_api_sample(string $formattedParent, string $apiId): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $api = new Api();
    $request = (new CreateApiRequest())
        ->setParent($formattedParent)
        ->setApi($api)
        ->setApiId($apiId);

    // Call the API and handle any network failures.
    try {
        /** @var Api $response */
        $response = $registryClient->createApi($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 = RegistryClient::locationName('[PROJECT]', '[LOCATION]');
    $apiId = '[API_ID]';

    create_api_sample($formattedParent, $apiId);
}

createApiDeployment

Creates a specified deployment.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::createApiDeploymentAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\CreateApiDeploymentRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\CreateApiDeploymentRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of deployments.
 *                                Format: `projects/*/locations/*/apis/*`
 *                                Please see {@see RegistryClient::apiName()} for help formatting this field.
 * @param string $apiDeploymentId The ID to use for the deployment, which will become the final component of
 *                                the deployment's resource name.
 *
 *                                This value should be 4-63 characters, and valid characters
 *                                are /[a-z][0-9]-/.
 *
 *                                Following AIP-162, IDs must not have the form of a UUID.
 */
function create_api_deployment_sample(string $formattedParent, string $apiDeploymentId): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $apiDeployment = new ApiDeployment();
    $request = (new CreateApiDeploymentRequest())
        ->setParent($formattedParent)
        ->setApiDeployment($apiDeployment)
        ->setApiDeploymentId($apiDeploymentId);

    // Call the API and handle any network failures.
    try {
        /** @var ApiDeployment $response */
        $response = $registryClient->createApiDeployment($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 = RegistryClient::apiName('[PROJECT]', '[LOCATION]', '[API]');
    $apiDeploymentId = '[API_DEPLOYMENT_ID]';

    create_api_deployment_sample($formattedParent, $apiDeploymentId);
}

createApiSpec

Creates a specified spec.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::createApiSpecAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\CreateApiSpecRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiSpec
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\CreateApiSpecRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of specs.
 *                                Format: `projects/*/locations/*/apis/*/versions/*`
 *                                Please see {@see RegistryClient::apiVersionName()} for help formatting this field.
 * @param string $apiSpecId       The ID to use for the spec, which will become the final component of
 *                                the spec's resource name.
 *
 *                                This value should be 4-63 characters, and valid characters
 *                                are /[a-z][0-9]-/.
 *
 *                                Following AIP-162, IDs must not have the form of a UUID.
 */
function create_api_spec_sample(string $formattedParent, string $apiSpecId): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $apiSpec = new ApiSpec();
    $request = (new CreateApiSpecRequest())
        ->setParent($formattedParent)
        ->setApiSpec($apiSpec)
        ->setApiSpecId($apiSpecId);

    // Call the API and handle any network failures.
    try {
        /** @var ApiSpec $response */
        $response = $registryClient->createApiSpec($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 = RegistryClient::apiVersionName('[PROJECT]', '[LOCATION]', '[API]', '[VERSION]');
    $apiSpecId = '[API_SPEC_ID]';

    create_api_spec_sample($formattedParent, $apiSpecId);
}

createApiVersion

Creates a specified version.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::createApiVersionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\CreateApiVersionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiVersion
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiVersion;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\CreateApiVersionRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of versions.
 *                                Format: `projects/*/locations/*/apis/*`
 *                                Please see {@see RegistryClient::apiName()} for help formatting this field.
 * @param string $apiVersionId    The ID to use for the version, which will become the final component of
 *                                the version's resource name.
 *
 *                                This value should be 1-63 characters, and valid characters
 *                                are /[a-z][0-9]-/.
 *
 *                                Following AIP-162, IDs must not have the form of a UUID.
 */
function create_api_version_sample(string $formattedParent, string $apiVersionId): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $apiVersion = new ApiVersion();
    $request = (new CreateApiVersionRequest())
        ->setParent($formattedParent)
        ->setApiVersion($apiVersion)
        ->setApiVersionId($apiVersionId);

    // Call the API and handle any network failures.
    try {
        /** @var ApiVersion $response */
        $response = $registryClient->createApiVersion($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 = RegistryClient::apiName('[PROJECT]', '[LOCATION]', '[API]');
    $apiVersionId = '[API_VERSION_ID]';

    create_api_version_sample($formattedParent, $apiVersionId);
}

createArtifact

Creates a specified artifact.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::createArtifactAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\CreateArtifactRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\Artifact
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Artifact;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\CreateArtifactRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of artifacts.
 *                                Format: `{parent}`
 *                                Please see {@see RegistryClient::locationName()} for help formatting this field.
 * @param string $artifactId      The ID to use for the artifact, which will become the final component of
 *                                the artifact's resource name.
 *
 *                                This value should be 4-63 characters, and valid characters
 *                                are /[a-z][0-9]-/.
 *
 *                                Following AIP-162, IDs must not have the form of a UUID.
 */
function create_artifact_sample(string $formattedParent, string $artifactId): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $artifact = new Artifact();
    $request = (new CreateArtifactRequest())
        ->setParent($formattedParent)
        ->setArtifact($artifact)
        ->setArtifactId($artifactId);

    // Call the API and handle any network failures.
    try {
        /** @var Artifact $response */
        $response = $registryClient->createArtifact($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 = RegistryClient::locationName('[PROJECT]', '[LOCATION]');
    $artifactId = '[ARTIFACT_ID]';

    create_artifact_sample($formattedParent, $artifactId);
}

deleteApi

Removes a specified API and all of the resources that it owns.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::deleteApiAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\DeleteApiRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\DeleteApiRequest;

/**
 * @param string $formattedName The name of the API to delete.
 *                              Format: `projects/*/locations/*/apis/*`
 *                              Please see {@see RegistryClient::apiName()} for help formatting this field.
 */
function delete_api_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        $registryClient->deleteApi($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 = RegistryClient::apiName('[PROJECT]', '[LOCATION]', '[API]');

    delete_api_sample($formattedName);
}

deleteApiDeployment

Removes a specified deployment, all revisions, and all child resources (e.g., artifacts).

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::deleteApiDeploymentAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\DeleteApiDeploymentRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\DeleteApiDeploymentRequest;

/**
 * @param string $formattedName The name of the deployment to delete.
 *                              Format: `projects/*/locations/*/apis/*/deployments/*`
 *                              Please see {@see RegistryClient::apiDeploymentName()} for help formatting this field.
 */
function delete_api_deployment_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        $registryClient->deleteApiDeployment($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 = RegistryClient::apiDeploymentName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[DEPLOYMENT]'
    );

    delete_api_deployment_sample($formattedName);
}

deleteApiDeploymentRevision

Deletes a revision of a deployment.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::deleteApiDeploymentRevisionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\DeleteApiDeploymentRevisionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\DeleteApiDeploymentRevisionRequest;

/**
 * @param string $formattedName The name of the deployment revision to be deleted,
 *                              with a revision ID explicitly included.
 *
 *                              Example:
 *                              `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
 *                              Please see {@see RegistryClient::apiDeploymentName()} for help formatting this field.
 */
function delete_api_deployment_revision_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiDeployment $response */
        $response = $registryClient->deleteApiDeploymentRevision($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 = RegistryClient::apiDeploymentName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[DEPLOYMENT]'
    );

    delete_api_deployment_revision_sample($formattedName);
}

deleteApiSpec

Removes a specified spec, all revisions, and all child resources (e.g., artifacts).

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::deleteApiSpecAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\DeleteApiSpecRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\DeleteApiSpecRequest;

/**
 * @param string $formattedName The name of the spec to delete.
 *                              Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
 *                              Please see {@see RegistryClient::apiSpecName()} for help formatting this field.
 */
function delete_api_spec_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        $registryClient->deleteApiSpec($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 = RegistryClient::apiSpecName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[VERSION]',
        '[SPEC]'
    );

    delete_api_spec_sample($formattedName);
}

deleteApiSpecRevision

Deletes a revision of a spec.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::deleteApiSpecRevisionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\DeleteApiSpecRevisionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiSpec
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\DeleteApiSpecRevisionRequest;

/**
 * @param string $formattedName The name of the spec revision to be deleted,
 *                              with a revision ID explicitly included.
 *
 *                              Example:
 *                              `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
 *                              Please see {@see RegistryClient::apiSpecName()} for help formatting this field.
 */
function delete_api_spec_revision_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiSpec $response */
        $response = $registryClient->deleteApiSpecRevision($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 = RegistryClient::apiSpecName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[VERSION]',
        '[SPEC]'
    );

    delete_api_spec_revision_sample($formattedName);
}

deleteApiVersion

Removes a specified version and all of the resources that it owns.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::deleteApiVersionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\DeleteApiVersionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\DeleteApiVersionRequest;

/**
 * @param string $formattedName The name of the version to delete.
 *                              Format: `projects/*/locations/*/apis/*/versions/*`
 *                              Please see {@see RegistryClient::apiVersionName()} for help formatting this field.
 */
function delete_api_version_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        $registryClient->deleteApiVersion($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 = RegistryClient::apiVersionName('[PROJECT]', '[LOCATION]', '[API]', '[VERSION]');

    delete_api_version_sample($formattedName);
}

deleteArtifact

Removes a specified artifact.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::deleteArtifactAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\DeleteArtifactRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\DeleteArtifactRequest;

/**
 * @param string $formattedName The name of the artifact to delete.
 *                              Format: `{parent}/artifacts/*`
 *                              Please see {@see RegistryClient::artifactName()} for help formatting this field.
 */
function delete_artifact_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        $registryClient->deleteArtifact($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 = RegistryClient::artifactName('[PROJECT]', '[LOCATION]', '[ARTIFACT]');

    delete_artifact_sample($formattedName);
}

getApi

Returns a specified API.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getApiAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\GetApiRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\Api
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Api;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\GetApiRequest;

/**
 * @param string $formattedName The name of the API to retrieve.
 *                              Format: `projects/*/locations/*/apis/*`
 *                              Please see {@see RegistryClient::apiName()} for help formatting this field.
 */
function get_api_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Api $response */
        $response = $registryClient->getApi($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 = RegistryClient::apiName('[PROJECT]', '[LOCATION]', '[API]');

    get_api_sample($formattedName);
}

getApiDeployment

Returns a specified deployment.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getApiDeploymentAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\GetApiDeploymentRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\GetApiDeploymentRequest;

/**
 * @param string $formattedName The name of the deployment to retrieve.
 *                              Format: `projects/*/locations/*/apis/*/deployments/*`
 *                              Please see {@see RegistryClient::apiDeploymentName()} for help formatting this field.
 */
function get_api_deployment_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiDeployment $response */
        $response = $registryClient->getApiDeployment($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 = RegistryClient::apiDeploymentName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[DEPLOYMENT]'
    );

    get_api_deployment_sample($formattedName);
}

getApiSpec

Returns a specified spec.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getApiSpecAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\GetApiSpecRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiSpec
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\GetApiSpecRequest;

/**
 * @param string $formattedName The name of the spec to retrieve.
 *                              Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
 *                              Please see {@see RegistryClient::apiSpecName()} for help formatting this field.
 */
function get_api_spec_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiSpec $response */
        $response = $registryClient->getApiSpec($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 = RegistryClient::apiSpecName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[VERSION]',
        '[SPEC]'
    );

    get_api_spec_sample($formattedName);
}

getApiSpecContents

Returns the contents of a specified spec.

If specs are stored with GZip compression, the default behavior is to return the spec uncompressed (the mime_type response field indicates the exact format returned).

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getApiSpecContentsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\GetApiSpecContentsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Api\HttpBody
Example
use Google\ApiCore\ApiException;
use Google\Api\HttpBody;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\GetApiSpecContentsRequest;

/**
 * @param string $formattedName The name of the spec whose contents should be retrieved.
 *                              Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
 *                              Please see {@see RegistryClient::apiSpecName()} for help formatting this field.
 */
function get_api_spec_contents_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var HttpBody $response */
        $response = $registryClient->getApiSpecContents($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 = RegistryClient::apiSpecName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[VERSION]',
        '[SPEC]'
    );

    get_api_spec_contents_sample($formattedName);
}

getApiVersion

Returns a specified version.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getApiVersionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\GetApiVersionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiVersion
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiVersion;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\GetApiVersionRequest;

/**
 * @param string $formattedName The name of the version to retrieve.
 *                              Format: `projects/*/locations/*/apis/*/versions/*`
 *                              Please see {@see RegistryClient::apiVersionName()} for help formatting this field.
 */
function get_api_version_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiVersion $response */
        $response = $registryClient->getApiVersion($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 = RegistryClient::apiVersionName('[PROJECT]', '[LOCATION]', '[API]', '[VERSION]');

    get_api_version_sample($formattedName);
}

getArtifact

Returns a specified artifact.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getArtifactAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\GetArtifactRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\Artifact
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Artifact;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\GetArtifactRequest;

/**
 * @param string $formattedName The name of the artifact to retrieve.
 *                              Format: `{parent}/artifacts/*`
 *                              Please see {@see RegistryClient::artifactName()} for help formatting this field.
 */
function get_artifact_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Artifact $response */
        $response = $registryClient->getArtifact($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 = RegistryClient::artifactName('[PROJECT]', '[LOCATION]', '[ARTIFACT]');

    get_artifact_sample($formattedName);
}

getArtifactContents

Returns the contents of a specified artifact.

If artifacts are stored with GZip compression, the default behavior is to return the artifact uncompressed (the mime_type response field indicates the exact format returned).

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getArtifactContentsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\GetArtifactContentsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Api\HttpBody
Example
use Google\ApiCore\ApiException;
use Google\Api\HttpBody;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\GetArtifactContentsRequest;

/**
 * @param string $formattedName The name of the artifact whose contents should be retrieved.
 *                              Format: `{parent}/artifacts/*`
 *                              Please see {@see RegistryClient::artifactName()} for help formatting this field.
 */
function get_artifact_contents_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var HttpBody $response */
        $response = $registryClient->getArtifactContents($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 = RegistryClient::artifactName('[PROJECT]', '[LOCATION]', '[ARTIFACT]');

    get_artifact_contents_sample($formattedName);
}

listApiDeploymentRevisions

Lists all revisions of a deployment.

Revisions are returned in descending order of revision creation time.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::listApiDeploymentRevisionsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ListApiDeploymentRevisionsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ListApiDeploymentRevisionsRequest;

/**
 * @param string $formattedName The name of the deployment to list revisions for. Please see
 *                              {@see RegistryClient::apiDeploymentName()} for help formatting this field.
 */
function list_api_deployment_revisions_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

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

        /** @var ApiDeployment $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 = RegistryClient::apiDeploymentName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[DEPLOYMENT]'
    );

    list_api_deployment_revisions_sample($formattedName);
}

listApiDeployments

Returns matching deployments.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::listApiDeploymentsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ListApiDeploymentsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ListApiDeploymentsRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of deployments.
 *                                Format: `projects/*/locations/*/apis/*`
 *                                Please see {@see RegistryClient::apiName()} for help formatting this field.
 */
function list_api_deployments_sample(string $formattedParent): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

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

        /** @var ApiDeployment $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 = RegistryClient::apiName('[PROJECT]', '[LOCATION]', '[API]');

    list_api_deployments_sample($formattedParent);
}

listApiSpecRevisions

Lists all revisions of a spec.

Revisions are returned in descending order of revision creation time.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::listApiSpecRevisionsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ListApiSpecRevisionsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ListApiSpecRevisionsRequest;

/**
 * @param string $formattedName The name of the spec to list revisions for. Please see
 *                              {@see RegistryClient::apiSpecName()} for help formatting this field.
 */
function list_api_spec_revisions_sample(string $formattedName): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

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

        /** @var ApiSpec $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 = RegistryClient::apiSpecName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[VERSION]',
        '[SPEC]'
    );

    list_api_spec_revisions_sample($formattedName);
}

listApiSpecs

Returns matching specs.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::listApiSpecsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ListApiSpecsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ListApiSpecsRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of specs.
 *                                Format: `projects/*/locations/*/apis/*/versions/*`
 *                                Please see {@see RegistryClient::apiVersionName()} for help formatting this field.
 */
function list_api_specs_sample(string $formattedParent): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

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

        /** @var ApiSpec $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 = RegistryClient::apiVersionName('[PROJECT]', '[LOCATION]', '[API]', '[VERSION]');

    list_api_specs_sample($formattedParent);
}

listApiVersions

Returns matching versions.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::listApiVersionsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ListApiVersionsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\ApiVersion;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ListApiVersionsRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of versions.
 *                                Format: `projects/*/locations/*/apis/*`
 *                                Please see {@see RegistryClient::apiName()} for help formatting this field.
 */
function list_api_versions_sample(string $formattedParent): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

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

        /** @var ApiVersion $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 = RegistryClient::apiName('[PROJECT]', '[LOCATION]', '[API]');

    list_api_versions_sample($formattedParent);
}

listApis

Returns matching APIs.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::listApisAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ListApisRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\Api;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ListApisRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of APIs.
 *                                Format: `projects/*/locations/*`
 *                                Please see {@see RegistryClient::locationName()} for help formatting this field.
 */
function list_apis_sample(string $formattedParent): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

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

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

    list_apis_sample($formattedParent);
}

listArtifacts

Returns matching artifacts.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::listArtifactsAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ListArtifactsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\Artifact;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ListArtifactsRequest;

/**
 * @param string $formattedParent The parent, which owns this collection of artifacts.
 *                                Format: `{parent}`
 *                                Please see {@see RegistryClient::locationName()} for help formatting this field.
 */
function list_artifacts_sample(string $formattedParent): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

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

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

    list_artifacts_sample($formattedParent);
}

replaceArtifact

Used to replace a specified artifact.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::replaceArtifactAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\ReplaceArtifactRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\Artifact
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Artifact;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\ReplaceArtifactRequest;

/**
 * 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 replace_artifact_sample(): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $artifact = new Artifact();
    $request = (new ReplaceArtifactRequest())
        ->setArtifact($artifact);

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

rollbackApiDeployment

Sets the current revision to a specified prior revision. Note that this creates a new revision with a new revision ID.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::rollbackApiDeploymentAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\RollbackApiDeploymentRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\RollbackApiDeploymentRequest;

/**
 * @param string $formattedName The deployment being rolled back. Please see
 *                              {@see RegistryClient::apiDeploymentName()} for help formatting this field.
 * @param string $revisionId    The revision ID to roll back to.
 *                              It must be a revision of the same deployment.
 *
 *                              Example: `c7cfa2a8`
 */
function rollback_api_deployment_sample(string $formattedName, string $revisionId): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiDeployment $response */
        $response = $registryClient->rollbackApiDeployment($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 = RegistryClient::apiDeploymentName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[DEPLOYMENT]'
    );
    $revisionId = '[REVISION_ID]';

    rollback_api_deployment_sample($formattedName, $revisionId);
}

rollbackApiSpec

Sets the current revision to a specified prior revision.

Note that this creates a new revision with a new revision ID.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::rollbackApiSpecAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\RollbackApiSpecRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiSpec
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\RollbackApiSpecRequest;

/**
 * @param string $formattedName The spec being rolled back. Please see
 *                              {@see RegistryClient::apiSpecName()} for help formatting this field.
 * @param string $revisionId    The revision ID to roll back to.
 *                              It must be a revision of the same spec.
 *
 *                              Example: `c7cfa2a8`
 */
function rollback_api_spec_sample(string $formattedName, string $revisionId): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiSpec $response */
        $response = $registryClient->rollbackApiSpec($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 = RegistryClient::apiSpecName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[VERSION]',
        '[SPEC]'
    );
    $revisionId = '[REVISION_ID]';

    rollback_api_spec_sample($formattedName, $revisionId);
}

tagApiDeploymentRevision

Adds a tag to a specified revision of a deployment.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::tagApiDeploymentRevisionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\TagApiDeploymentRevisionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\TagApiDeploymentRevisionRequest;

/**
 * @param string $formattedName The name of the deployment to be tagged, including the revision ID. Please see
 *                              {@see RegistryClient::apiDeploymentName()} for help formatting this field.
 * @param string $tag           The tag to apply.
 *                              The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
 */
function tag_api_deployment_revision_sample(string $formattedName, string $tag): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiDeployment $response */
        $response = $registryClient->tagApiDeploymentRevision($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 = RegistryClient::apiDeploymentName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[DEPLOYMENT]'
    );
    $tag = '[TAG]';

    tag_api_deployment_revision_sample($formattedName, $tag);
}

tagApiSpecRevision

Adds a tag to a specified revision of a spec.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::tagApiSpecRevisionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\TagApiSpecRevisionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiSpec
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\TagApiSpecRevisionRequest;

/**
 * @param string $formattedName The name of the spec to be tagged, including the revision ID. Please see
 *                              {@see RegistryClient::apiSpecName()} for help formatting this field.
 * @param string $tag           The tag to apply.
 *                              The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
 */
function tag_api_spec_revision_sample(string $formattedName, string $tag): void
{
    // Create a client.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ApiSpec $response */
        $response = $registryClient->tagApiSpecRevision($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 = RegistryClient::apiSpecName(
        '[PROJECT]',
        '[LOCATION]',
        '[API]',
        '[VERSION]',
        '[SPEC]'
    );
    $tag = '[TAG]';

    tag_api_spec_revision_sample($formattedName, $tag);
}

updateApi

Used to modify a specified API.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::updateApiAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\UpdateApiRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\Api
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Api;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\UpdateApiRequest;

/**
 * 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_api_sample(): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $api = new Api();
    $request = (new UpdateApiRequest())
        ->setApi($api);

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

updateApiDeployment

Used to modify a specified deployment.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::updateApiDeploymentAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\UpdateApiDeploymentRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiDeployment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiDeployment;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\UpdateApiDeploymentRequest;

/**
 * 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_api_deployment_sample(): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $apiDeployment = new ApiDeployment();
    $request = (new UpdateApiDeploymentRequest())
        ->setApiDeployment($apiDeployment);

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

updateApiSpec

Used to modify a specified spec.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::updateApiSpecAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\UpdateApiSpecRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiSpec
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiSpec;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\UpdateApiSpecRequest;

/**
 * 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_api_spec_sample(): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $apiSpec = new ApiSpec();
    $request = (new UpdateApiSpecRequest())
        ->setApiSpec($apiSpec);

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

updateApiVersion

Used to modify a specified version.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::updateApiVersionAsync() .

Parameters
NameDescription
request Google\Cloud\ApigeeRegistry\V1\UpdateApiVersionRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\ApigeeRegistry\V1\ApiVersion
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\ApiVersion;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
use Google\Cloud\ApigeeRegistry\V1\UpdateApiVersionRequest;

/**
 * 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_api_version_sample(): void
{
    // Create a client.
    $registryClient = new RegistryClient();

    // Prepare the request message.
    $apiVersion = new ApiVersion();
    $request = (new UpdateApiVersionRequest())
        ->setApiVersion($apiVersion);

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

getLocation

Gets information about a location.

The async variant is Google\Cloud\ApigeeRegistry\V1\Client\BaseClient\self::getLocationAsync() .

Parameters
NameDescription
request Google\Cloud\Location\GetLocationRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\Location\Location
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
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.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Location $response */
        $response = $registryClient->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\ApigeeRegistry\V1\Client\BaseClient\self::listLocationsAsync() .

Parameters
NameDescription
request Google\Cloud\Location\ListLocationsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
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.
    $registryClient = new RegistryClient();

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

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

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\ApigeeRegistry\V1\Client\BaseClient\self::getIamPolicyAsync() .

Parameters
NameDescription
request Google\Cloud\Iam\V1\GetIamPolicyRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
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.
    $registryClient = new RegistryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Policy $response */
        $response = $registryClient->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\ApigeeRegistry\V1\Client\BaseClient\self::setIamPolicyAsync() .

Parameters
NameDescription
request Google\Cloud\Iam\V1\SetIamPolicyRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
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.
    $registryClient = new RegistryClient();

    // 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 = $registryClient->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\ApigeeRegistry\V1\Client\BaseClient\self::testIamPermissionsAsync() .

Parameters
NameDescription
request Google\Cloud\Iam\V1\TestIamPermissionsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
TypeDescription
Google\Cloud\Iam\V1\TestIamPermissionsResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ApigeeRegistry\V1\Client\RegistryClient;
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.
    $registryClient = new RegistryClient();

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

createApiAsync

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

createApiDeploymentAsync

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

createApiSpecAsync

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

createApiVersionAsync

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

createArtifactAsync

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

deleteApiAsync

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

deleteApiDeploymentAsync

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

deleteApiDeploymentRevisionAsync

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

deleteApiSpecAsync

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

deleteApiSpecRevisionAsync

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

deleteApiVersionAsync

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

deleteArtifactAsync

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

getApiAsync

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

getApiDeploymentAsync

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

getApiSpecAsync

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

getApiSpecContentsAsync

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

getApiVersionAsync

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

getArtifactAsync

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

getArtifactContentsAsync

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

listApiDeploymentRevisionsAsync

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

listApiDeploymentsAsync

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

listApiSpecRevisionsAsync

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

listApiSpecsAsync

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

listApiVersionsAsync

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

listApisAsync

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

listArtifactsAsync

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

replaceArtifactAsync

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

rollbackApiDeploymentAsync

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

rollbackApiSpecAsync

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

tagApiDeploymentRevisionAsync

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

tagApiSpecRevisionAsync

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

updateApiAsync

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

updateApiDeploymentAsync

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

updateApiSpecAsync

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

updateApiVersionAsync

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

getLocationAsync

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

listLocationsAsync

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

getIamPolicyAsync

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

setIamPolicyAsync

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

testIamPermissionsAsync

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

static::apiName

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

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

static::apiDeploymentName

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

Parameters
NameDescription
project string
location string
api string
deployment string
Returns
TypeDescription
stringThe formatted api_deployment resource.

static::apiSpecName

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

Parameters
NameDescription
project string
location string
api string
version string
spec string
Returns
TypeDescription
stringThe formatted api_spec resource.

static::apiVersionName

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

Parameters
NameDescription
project string
location string
api string
version string
Returns
TypeDescription
stringThe formatted api_version resource.

static::artifactName

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

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

static::locationName

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

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

static::projectLocationApiArtifactName

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

Parameters
NameDescription
project string
location string
api string
artifact string
Returns
TypeDescription
stringThe formatted project_location_api_artifact resource.

static::projectLocationApiDeploymentArtifactName

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

Parameters
NameDescription
project string
location string
api string
deployment string
artifact string
Returns
TypeDescription
stringThe formatted project_location_api_deployment_artifact resource.

static::projectLocationApiVersionArtifactName

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

Parameters
NameDescription
project string
location string
api string
version string
artifact string
Returns
TypeDescription
stringThe formatted project_location_api_version_artifact resource.

static::projectLocationApiVersionSpecArtifactName

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

Parameters
NameDescription
project string
location string
api string
version string
spec string
artifact string
Returns
TypeDescription
stringThe formatted project_location_api_version_spec_artifact resource.

static::projectLocationArtifactName

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

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

  • api: projects/{project}/locations/{location}/apis/{api}
  • apiDeployment: projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}
  • apiSpec: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
  • apiVersion: projects/{project}/locations/{location}/apis/{api}/versions/{version}
  • artifact: projects/{project}/locations/{location}/artifacts/{artifact}
  • location: projects/{project}/locations/{location}
  • projectLocationApiArtifact: projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}
  • projectLocationApiDeploymentArtifact: projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}
  • projectLocationApiVersionArtifact: projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}
  • projectLocationApiVersionSpecArtifact: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}
  • projectLocationArtifact: projects/{project}/locations/{location}/artifacts/{artifact}

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

Parameters
NameDescription
formattedName string

The formatted name string

template string

Optional name of template to match

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