Google Cloud Config Delivery V1 Client - Class ConfigDeliveryClient (0.2.0)

Reference documentation and code samples for the Google Cloud Config Delivery V1 Client class ConfigDeliveryClient.

Service Description: ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters.

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

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

Namespace

Google \ Cloud \ ConfigDelivery \ V1 \ Client

Methods

__construct

Constructor.

Parameters
Name Description
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

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

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. Important: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud Platform, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information https://cloud.google.com/docs/authentication/external/externally-sourced-credentials

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

↳ logger false|LoggerInterface

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

abortRollout

Abort a Rollout.

The async variant is ConfigDeliveryClient::abortRolloutAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\AbortRolloutRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\AbortRolloutRequest;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\Rollout;
use Google\Rpc\Status;

/**
 * @param string $formattedName Name of the Rollout. Please see
 *                              {@see ConfigDeliveryClient::rolloutName()} for help formatting this field.
 */
function abort_rollout_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        if ($response->operationSucceeded()) {
            /** @var Rollout $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    abort_rollout_sample($formattedName);
}

createFleetPackage

Creates a new FleetPackage in a given project and location.

The async variant is ConfigDeliveryClient::createFleetPackageAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateFleetPackageRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\CreateFleetPackageRequest;
use Google\Cloud\ConfigDelivery\V1\FleetPackage;
use Google\Cloud\ConfigDelivery\V1\FleetPackage\ResourceBundleSelector;
use Google\Cloud\ConfigDelivery\V1\FleetPackage\VariantSelector;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                                Value for parent. Please see
 *                                                               {@see ConfigDeliveryClient::locationName()} for help formatting this field.
 * @param string $fleetPackageId                                 Id of the requesting object
 *                                                               If auto-generating Id server-side, remove this field and
 *                                                               fleet_package_id from the method_signature of Create RPC
 * @param string $fleetPackageVariantSelectorVariantNameTemplate variant_name_template is a template that can refer to
 *                                                               variables containing cluster membership metadata such as location,
 *                                                               name, and labels to generate the name of the variant for a target
 *                                                               cluster. The variable syntax is similar to the unix shell variables.
 *
 *                                                               Available variables are `${membership.name}`, `${membership.location}`,
 *                                                               `${membership.project}` and `${membership.labels['label_name']}`.
 *
 *                                                               If you want to deploy a specific variant, say "default" to all the
 *                                                               clusters, you can use "default" (string without any variables) as
 *                                                               the variant_name_template.
 */
function create_fleet_package_sample(
    string $formattedParent,
    string $fleetPackageId,
    string $fleetPackageVariantSelectorVariantNameTemplate
): void {
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

    // Prepare the request message.
    $fleetPackageResourceBundleSelector = new ResourceBundleSelector();
    $fleetPackageVariantSelector = (new VariantSelector())
        ->setVariantNameTemplate($fleetPackageVariantSelectorVariantNameTemplate);
    $fleetPackage = (new FleetPackage())
        ->setResourceBundleSelector($fleetPackageResourceBundleSelector)
        ->setVariantSelector($fleetPackageVariantSelector);
    $request = (new CreateFleetPackageRequest())
        ->setParent($formattedParent)
        ->setFleetPackageId($fleetPackageId)
        ->setFleetPackage($fleetPackage);

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

        if ($response->operationSucceeded()) {
            /** @var FleetPackage $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    create_fleet_package_sample(
        $formattedParent,
        $fleetPackageId,
        $fleetPackageVariantSelectorVariantNameTemplate
    );
}

createRelease

Creates a new Release in a given project, location and resource bundle.

The async variant is ConfigDeliveryClient::createReleaseAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateReleaseRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\CreateReleaseRequest;
use Google\Cloud\ConfigDelivery\V1\Release;
use Google\Rpc\Status;

/**
 * @param string $formattedParent Value for parent. Please see
 *                                {@see ConfigDeliveryClient::resourceBundleName()} for help formatting this field.
 * @param string $releaseId       Id of the requesting object
 *                                If auto-generating Id server-side, remove this field and
 *                                release_id from the method_signature of Create RPC
 * @param string $releaseVersion  version of the `Release`. This must be v<major>.<minor>.<patch>.
 */
function create_release_sample(
    string $formattedParent,
    string $releaseId,
    string $releaseVersion
): void {
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

    // Prepare the request message.
    $release = (new Release())
        ->setVersion($releaseVersion);
    $request = (new CreateReleaseRequest())
        ->setParent($formattedParent)
        ->setReleaseId($releaseId)
        ->setRelease($release);

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

        if ($response->operationSucceeded()) {
            /** @var Release $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    create_release_sample($formattedParent, $releaseId, $releaseVersion);
}

createResourceBundle

Creates a new ResourceBundle in a given project and location.

The async variant is ConfigDeliveryClient::createResourceBundleAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateResourceBundleRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\CreateResourceBundleRequest;
use Google\Cloud\ConfigDelivery\V1\ResourceBundle;
use Google\Rpc\Status;

/**
 * @param string $formattedParent  Value for parent. Please see
 *                                 {@see ConfigDeliveryClient::locationName()} for help formatting this field.
 * @param string $resourceBundleId Id of the requesting object
 *                                 If auto-generating Id server-side, remove this field and
 *                                 resource_bundle_id from the method_signature of Create RPC
 */
function create_resource_bundle_sample(string $formattedParent, string $resourceBundleId): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

    // Prepare the request message.
    $resourceBundle = new ResourceBundle();
    $request = (new CreateResourceBundleRequest())
        ->setParent($formattedParent)
        ->setResourceBundleId($resourceBundleId)
        ->setResourceBundle($resourceBundle);

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

        if ($response->operationSucceeded()) {
            /** @var ResourceBundle $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    create_resource_bundle_sample($formattedParent, $resourceBundleId);
}

createVariant

Creates a new Variant in a given project, location, resource bundle, and release.

The async variant is ConfigDeliveryClient::createVariantAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateVariantRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\CreateVariantRequest;
use Google\Cloud\ConfigDelivery\V1\Variant;
use Google\Rpc\Status;

/**
 * @param string $formattedParent         Value for parent. Please see
 *                                        {@see ConfigDeliveryClient::releaseName()} for help formatting this field.
 * @param string $variantId               Id of the requesting object
 * @param string $variantResourcesElement Input only. Unordered list. resources contain the kubernetes
 *                                        manifests (YAMLs) for this variant.
 */
function create_variant_sample(
    string $formattedParent,
    string $variantId,
    string $variantResourcesElement
): void {
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

    // Prepare the request message.
    $variantResources = [$variantResourcesElement,];
    $variant = (new Variant())
        ->setResources($variantResources);
    $request = (new CreateVariantRequest())
        ->setParent($formattedParent)
        ->setVariantId($variantId)
        ->setVariant($variant);

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

        if ($response->operationSucceeded()) {
            /** @var Variant $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    create_variant_sample($formattedParent, $variantId, $variantResourcesElement);
}

deleteFleetPackage

Deletes a single FleetPackage.

The async variant is ConfigDeliveryClient::deleteFleetPackageAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteFleetPackageRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\DeleteFleetPackageRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::fleetPackageName()} for help formatting this field.
 */
function delete_fleet_package_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    delete_fleet_package_sample($formattedName);
}

deleteRelease

Deletes a single Release.

The async variant is ConfigDeliveryClient::deleteReleaseAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteReleaseRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\DeleteReleaseRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::releaseName()} for help formatting this field.
 */
function delete_release_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    delete_release_sample($formattedName);
}

deleteResourceBundle

Deletes a single ResourceBundle.

The async variant is ConfigDeliveryClient::deleteResourceBundleAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteResourceBundleRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\DeleteResourceBundleRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::resourceBundleName()} for help formatting this field.
 */
function delete_resource_bundle_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    delete_resource_bundle_sample($formattedName);
}

deleteVariant

Deletes a single Variant.

The async variant is ConfigDeliveryClient::deleteVariantAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteVariantRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\DeleteVariantRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::variantName()} for help formatting this field.
 */
function delete_variant_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    delete_variant_sample($formattedName);
}

getFleetPackage

Gets details of a single FleetPackage.

The async variant is ConfigDeliveryClient::getFleetPackageAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetFleetPackageRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\ConfigDelivery\V1\FleetPackage
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\FleetPackage;
use Google\Cloud\ConfigDelivery\V1\GetFleetPackageRequest;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::fleetPackageName()} for help formatting this field.
 */
function get_fleet_package_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var FleetPackage $response */
        $response = $configDeliveryClient->getFleetPackage($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 = ConfigDeliveryClient::fleetPackageName(
        '[PROJECT]',
        '[LOCATION]',
        '[FLEET_PACKAGE]'
    );

    get_fleet_package_sample($formattedName);
}

getRelease

Gets details of a single Release.

The async variant is ConfigDeliveryClient::getReleaseAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetReleaseRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\ConfigDelivery\V1\Release
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\GetReleaseRequest;
use Google\Cloud\ConfigDelivery\V1\Release;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::releaseName()} for help formatting this field.
 */
function get_release_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Release $response */
        $response = $configDeliveryClient->getRelease($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 = ConfigDeliveryClient::releaseName(
        '[PROJECT]',
        '[LOCATION]',
        '[RESOURCE_BUNDLE]',
        '[RELEASE]'
    );

    get_release_sample($formattedName);
}

getResourceBundle

Gets details of a single ResourceBundle.

The async variant is ConfigDeliveryClient::getResourceBundleAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetResourceBundleRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\ConfigDelivery\V1\ResourceBundle
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\GetResourceBundleRequest;
use Google\Cloud\ConfigDelivery\V1\ResourceBundle;

/**
 * @param string $formattedName Name of the resource. Please see
 *                              {@see ConfigDeliveryClient::resourceBundleName()} for help formatting this field.
 */
function get_resource_bundle_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ResourceBundle $response */
        $response = $configDeliveryClient->getResourceBundle($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 = ConfigDeliveryClient::resourceBundleName(
        '[PROJECT]',
        '[LOCATION]',
        '[RESOURCE_BUNDLE]'
    );

    get_resource_bundle_sample($formattedName);
}

getRollout

Gets details of a single Rollout.

The async variant is ConfigDeliveryClient::getRolloutAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetRolloutRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\ConfigDelivery\V1\Rollout
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\GetRolloutRequest;
use Google\Cloud\ConfigDelivery\V1\Rollout;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::rolloutName()} for help formatting this field.
 */
function get_rollout_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Rollout $response */
        $response = $configDeliveryClient->getRollout($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 = ConfigDeliveryClient::rolloutName(
        '[PROJECT]',
        '[LOCATION]',
        '[FLEET_PACKAGE]',
        '[ROLLOUT]'
    );

    get_rollout_sample($formattedName);
}

getVariant

Gets details of a single Variant.

The async variant is ConfigDeliveryClient::getVariantAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetVariantRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\ConfigDelivery\V1\Variant
Example
use Google\ApiCore\ApiException;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\GetVariantRequest;
use Google\Cloud\ConfigDelivery\V1\Variant;

/**
 * @param string $formattedName Name of the resource
 *                              Please see {@see ConfigDeliveryClient::variantName()} for help formatting this field.
 */
function get_variant_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Variant $response */
        $response = $configDeliveryClient->getVariant($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 = ConfigDeliveryClient::variantName(
        '[PROJECT]',
        '[LOCATION]',
        '[RESOURCE_BUNDLE]',
        '[RELEASE]',
        '[VARIANT]'
    );

    get_variant_sample($formattedName);
}

listFleetPackages

Lists FleetPackages in a given project and location.

The async variant is ConfigDeliveryClient::listFleetPackagesAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListFleetPackagesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\FleetPackage;
use Google\Cloud\ConfigDelivery\V1\ListFleetPackagesRequest;

/**
 * @param string $formattedParent Parent value for ListFleetPackagesRequest. Please see
 *                                {@see ConfigDeliveryClient::locationName()} for help formatting this field.
 */
function list_fleet_packages_sample(string $formattedParent): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

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

    list_fleet_packages_sample($formattedParent);
}

listReleases

Lists Releases in a given project and location.

The async variant is ConfigDeliveryClient::listReleasesAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListReleasesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\ListReleasesRequest;
use Google\Cloud\ConfigDelivery\V1\Release;

/**
 * @param string $formattedParent Parent value for ListReleasesRequest. Please see
 *                                {@see ConfigDeliveryClient::resourceBundleName()} for help formatting this field.
 */
function list_releases_sample(string $formattedParent): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        /** @var Release $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 = ConfigDeliveryClient::resourceBundleName(
        '[PROJECT]',
        '[LOCATION]',
        '[RESOURCE_BUNDLE]'
    );

    list_releases_sample($formattedParent);
}

listResourceBundles

Lists ResourceBundles in a given project and location.

The async variant is ConfigDeliveryClient::listResourceBundlesAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListResourceBundlesRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\ListResourceBundlesRequest;
use Google\Cloud\ConfigDelivery\V1\ResourceBundle;

/**
 * @param string $formattedParent Parent value for ListResourceBundlesRequest. Please see
 *                                {@see ConfigDeliveryClient::locationName()} for help formatting this field.
 */
function list_resource_bundles_sample(string $formattedParent): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

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

    list_resource_bundles_sample($formattedParent);
}

listRollouts

Lists Rollouts in a given project, location, and Fleet Package.

The async variant is ConfigDeliveryClient::listRolloutsAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListRolloutsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\ListRolloutsRequest;
use Google\Cloud\ConfigDelivery\V1\Rollout;

/**
 * @param string $formattedParent Parent value for ListRolloutsRequest
 *                                Please see {@see ConfigDeliveryClient::fleetPackageName()} for help formatting this field.
 */
function list_rollouts_sample(string $formattedParent): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        /** @var Rollout $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 = ConfigDeliveryClient::fleetPackageName(
        '[PROJECT]',
        '[LOCATION]',
        '[FLEET_PACKAGE]'
    );

    list_rollouts_sample($formattedParent);
}

listVariants

Lists Variants in a given project and location.

The async variant is ConfigDeliveryClient::listVariantsAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListVariantsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\ListVariantsRequest;
use Google\Cloud\ConfigDelivery\V1\Variant;

/**
 * @param string $formattedParent Parent value for ListVariantsRequest. Please see
 *                                {@see ConfigDeliveryClient::releaseName()} for help formatting this field.
 */
function list_variants_sample(string $formattedParent): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        /** @var Variant $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 = ConfigDeliveryClient::releaseName(
        '[PROJECT]',
        '[LOCATION]',
        '[RESOURCE_BUNDLE]',
        '[RELEASE]'
    );

    list_variants_sample($formattedParent);
}

resumeRollout

Resume a Rollout.

The async variant is ConfigDeliveryClient::resumeRolloutAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ResumeRolloutRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\ResumeRolloutRequest;
use Google\Cloud\ConfigDelivery\V1\Rollout;
use Google\Rpc\Status;

/**
 * @param string $formattedName Name of the Rollout. Please see
 *                              {@see ConfigDeliveryClient::rolloutName()} for help formatting this field.
 */
function resume_rollout_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        if ($response->operationSucceeded()) {
            /** @var Rollout $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    resume_rollout_sample($formattedName);
}

suspendRollout

Suspend a Rollout.

The async variant is ConfigDeliveryClient::suspendRolloutAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\SuspendRolloutRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\Rollout;
use Google\Cloud\ConfigDelivery\V1\SuspendRolloutRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName Name of the Rollout. Please see
 *                              {@see ConfigDeliveryClient::rolloutName()} for help formatting this field.
 */
function suspend_rollout_sample(string $formattedName): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

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

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

        if ($response->operationSucceeded()) {
            /** @var Rollout $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    suspend_rollout_sample($formattedName);
}

updateFleetPackage

Updates the parameters of a single FleetPackage.

The async variant is ConfigDeliveryClient::updateFleetPackageAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateFleetPackageRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\FleetPackage;
use Google\Cloud\ConfigDelivery\V1\FleetPackage\ResourceBundleSelector;
use Google\Cloud\ConfigDelivery\V1\FleetPackage\VariantSelector;
use Google\Cloud\ConfigDelivery\V1\UpdateFleetPackageRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $fleetPackageVariantSelectorVariantNameTemplate variant_name_template is a template that can refer to
 *                                                               variables containing cluster membership metadata such as location,
 *                                                               name, and labels to generate the name of the variant for a target
 *                                                               cluster. The variable syntax is similar to the unix shell variables.
 *
 *                                                               Available variables are `${membership.name}`, `${membership.location}`,
 *                                                               `${membership.project}` and `${membership.labels['label_name']}`.
 *
 *                                                               If you want to deploy a specific variant, say "default" to all the
 *                                                               clusters, you can use "default" (string without any variables) as
 *                                                               the variant_name_template.
 */
function update_fleet_package_sample(string $fleetPackageVariantSelectorVariantNameTemplate): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $fleetPackageResourceBundleSelector = new ResourceBundleSelector();
    $fleetPackageVariantSelector = (new VariantSelector())
        ->setVariantNameTemplate($fleetPackageVariantSelectorVariantNameTemplate);
    $fleetPackage = (new FleetPackage())
        ->setResourceBundleSelector($fleetPackageResourceBundleSelector)
        ->setVariantSelector($fleetPackageVariantSelector);
    $request = (new UpdateFleetPackageRequest())
        ->setUpdateMask($updateMask)
        ->setFleetPackage($fleetPackage);

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

        if ($response->operationSucceeded()) {
            /** @var FleetPackage $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    update_fleet_package_sample($fleetPackageVariantSelectorVariantNameTemplate);
}

updateRelease

Updates the parameters of a single Release.

The async variant is ConfigDeliveryClient::updateReleaseAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateReleaseRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\Release;
use Google\Cloud\ConfigDelivery\V1\UpdateReleaseRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $releaseVersion version of the `Release`. This must be v<major>.<minor>.<patch>.
 */
function update_release_sample(string $releaseVersion): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $release = (new Release())
        ->setVersion($releaseVersion);
    $request = (new UpdateReleaseRequest())
        ->setUpdateMask($updateMask)
        ->setRelease($release);

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

        if ($response->operationSucceeded()) {
            /** @var Release $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    update_release_sample($releaseVersion);
}

updateResourceBundle

Updates the parameters of a single ResourceBundle.

The async variant is ConfigDeliveryClient::updateResourceBundleAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateResourceBundleRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\ResourceBundle;
use Google\Cloud\ConfigDelivery\V1\UpdateResourceBundleRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

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

    // Prepare the request message.
    $updateMask = new FieldMask();
    $resourceBundle = new ResourceBundle();
    $request = (new UpdateResourceBundleRequest())
        ->setUpdateMask($updateMask)
        ->setResourceBundle($resourceBundle);

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

        if ($response->operationSucceeded()) {
            /** @var ResourceBundle $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

updateVariant

Updates the parameters of a single Variant.

The async variant is ConfigDeliveryClient::updateVariantAsync() .

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateVariantRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ConfigDelivery\V1\Client\ConfigDeliveryClient;
use Google\Cloud\ConfigDelivery\V1\UpdateVariantRequest;
use Google\Cloud\ConfigDelivery\V1\Variant;
use Google\Rpc\Status;

/**
 * @param string $variantResourcesElement Input only. Unordered list. resources contain the kubernetes
 *                                        manifests (YAMLs) for this variant.
 */
function update_variant_sample(string $variantResourcesElement): void
{
    // Create a client.
    $configDeliveryClient = new ConfigDeliveryClient();

    // Prepare the request message.
    $variantResources = [$variantResourcesElement,];
    $variant = (new Variant())
        ->setResources($variantResources);
    $request = (new UpdateVariantRequest())
        ->setVariant($variant);

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

        if ($response->operationSucceeded()) {
            /** @var Variant $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

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

    update_variant_sample($variantResourcesElement);
}

getLocation

Gets information about a location.

The async variant is ConfigDeliveryClient::getLocationAsync() .

Parameters
Name Description
request Google\Cloud\Location\GetLocationRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

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

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

    // Call the API and handle any network failures.
    try {
        /** @var Location $response */
        $response = $configDeliveryClient->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 ConfigDeliveryClient::listLocationsAsync() .

Parameters
Name Description
request Google\Cloud\Location\ListLocationsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

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

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

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

abortRolloutAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\AbortRolloutRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createFleetPackageAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateFleetPackageRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createReleaseAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateReleaseRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createResourceBundleAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateResourceBundleRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createVariantAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\CreateVariantRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteFleetPackageAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteFleetPackageRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteReleaseAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteReleaseRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteResourceBundleAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteResourceBundleRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteVariantAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\DeleteVariantRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

getFleetPackageAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetFleetPackageRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ConfigDelivery\V1\FleetPackage>

getReleaseAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetReleaseRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ConfigDelivery\V1\Release>

getResourceBundleAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetResourceBundleRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ConfigDelivery\V1\ResourceBundle>

getRolloutAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetRolloutRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ConfigDelivery\V1\Rollout>

getVariantAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\GetVariantRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ConfigDelivery\V1\Variant>

listFleetPackagesAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListFleetPackagesRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listReleasesAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListReleasesRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listResourceBundlesAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListResourceBundlesRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listRolloutsAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListRolloutsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listVariantsAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ListVariantsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

resumeRolloutAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\ResumeRolloutRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

suspendRolloutAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\SuspendRolloutRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateFleetPackageAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateFleetPackageRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateReleaseAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateReleaseRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateResourceBundleAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateResourceBundleRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateVariantAsync

Parameters
Name Description
request Google\Cloud\ConfigDelivery\V1\UpdateVariantRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

getLocationAsync

Parameters
Name Description
request Google\Cloud\Location\GetLocationRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location>

listLocationsAsync

Parameters
Name Description
request Google\Cloud\Location\ListLocationsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

getOperationsClient

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

Returns
Type Description
Google\LongRunning\Client\OperationsClient

resumeOperation

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

Parameters
Name Description
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
Type Description
Google\ApiCore\OperationResponse

static::fleetPackageName

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

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

static::locationName

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

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

static::projectName

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

Parameter
Name Description
project string
Returns
Type Description
string The formatted project resource.

static::releaseName

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

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

static::repositoryName

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

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

static::resourceBundleName

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

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

static::rolloutName

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

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

static::variantName

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

Parameters
Name Description
project string
location string
resourceBundle string
release string
variant string
Returns
Type Description
string The formatted variant 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

  • fleetPackage: projects/{project}/locations/{location}/fleetPackages/{fleet_package}
  • location: projects/{project}/locations/{location}
  • project: projects/{project}
  • release: projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}
  • repository: projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}
  • resourceBundle: projects/{project}/locations/{location}/resourceBundles/{resource_bundle}
  • rollout: projects/{project}/locations/{location}/fleetPackages/{fleet_package}/rollouts/{rollout}
  • variant: projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}

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

Parameters
Name Description
formattedName string

The formatted name string

template ?string

Optional name of template to match

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