Google Cloud Vmware Engine V1 Client - Class VmwareEngineClient (0.5.6)

Reference documentation and code samples for the Google Cloud Vmware Engine V1 Client class VmwareEngineClient.

Service Description: VMwareEngine manages VMware's private clusters in the Cloud.

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 \ VmwareEngine \ V1 \ Client

Methods

__construct

Constructor.

Parameters
Name Description
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

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

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

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

↳ credentialsConfig array

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

↳ disableRetries bool

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

↳ clientConfig string|array

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

↳ transport string|TransportInterface

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

↳ transportConfig array

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

↳ clientCertSource callable

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

createCluster

Creates a new cluster in a given private cloud.

Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient node quota.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createClusterAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateClusterRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\Cluster;
use Google\Cloud\VmwareEngine\V1\CreateClusterRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedParent The resource name of the private cloud to create a new cluster
 *                                in. Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 * @param string $clusterId       The user-provided identifier of the new `Cluster`.
 *                                This identifier must be unique among clusters within the parent and becomes
 *                                the final token in the name URI.
 *                                The identifier must meet the following requirements:
 *
 *                                * Only contains 1-63 alphanumeric characters and hyphens
 *                                * Begins with an alphabetical character
 *                                * Ends with a non-hyphen character
 *                                * Not formatted as a UUID
 *                                * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                (section 3.5)
 */
function create_cluster_sample(string $formattedParent, string $clusterId): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $clusterNodeTypeConfigs = [];
    $cluster = (new Cluster())
        ->setNodeTypeConfigs($clusterNodeTypeConfigs);
    $request = (new CreateClusterRequest())
        ->setParent($formattedParent)
        ->setClusterId($clusterId)
        ->setCluster($cluster);

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

        if ($response->operationSucceeded()) {
            /** @var Cluster $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );
    $clusterId = '[CLUSTER_ID]';

    create_cluster_sample($formattedParent, $clusterId);
}

createExternalAccessRule

Creates a new external access rule in a given network policy.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createExternalAccessRuleAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateExternalAccessRuleRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateExternalAccessRuleRequest;
use Google\Cloud\VmwareEngine\V1\ExternalAccessRule;
use Google\Rpc\Status;

/**
 * @param string $formattedParent      The resource name of the network policy
 *                                     to create a new external access firewall rule in.
 *                                     Resource names are schemeless URIs that follow the conventions in
 *                                     https://cloud.google.com/apis/design/resource_names.
 *                                     For example:
 *                                     `projects/my-project/locations/us-central1/networkPolicies/my-policy`
 *                                     Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field.
 * @param string $externalAccessRuleId The user-provided identifier of the `ExternalAccessRule` to be
 *                                     created. This identifier must be unique among `ExternalAccessRule`
 *                                     resources within the parent and becomes the final token in the name URI.
 *                                     The identifier must meet the following requirements:
 *
 *                                     * Only contains 1-63 alphanumeric characters and hyphens
 *                                     * Begins with an alphabetical character
 *                                     * Ends with a non-hyphen character
 *                                     * Not formatted as a UUID
 *                                     * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                     (section 3.5)
 */
function create_external_access_rule_sample(
    string $formattedParent,
    string $externalAccessRuleId
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $externalAccessRule = new ExternalAccessRule();
    $request = (new CreateExternalAccessRuleRequest())
        ->setParent($formattedParent)
        ->setExternalAccessRule($externalAccessRule)
        ->setExternalAccessRuleId($externalAccessRuleId);

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

        if ($response->operationSucceeded()) {
            /** @var ExternalAccessRule $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 = VmwareEngineClient::networkPolicyName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_POLICY]'
    );
    $externalAccessRuleId = '[EXTERNAL_ACCESS_RULE_ID]';

    create_external_access_rule_sample($formattedParent, $externalAccessRuleId);
}

createExternalAddress

Creates a new ExternalAddress resource in a given private cloud. The network policy that corresponds to the private cloud must have the external IP address network service enabled (NetworkPolicy.external_ip).

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createExternalAddressAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateExternalAddressRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateExternalAddressRequest;
use Google\Cloud\VmwareEngine\V1\ExternalAddress;
use Google\Rpc\Status;

/**
 * @param string $formattedParent   The resource name of the private cloud
 *                                  to create a new external IP address in.
 *                                  Resource names are schemeless URIs that follow the conventions in
 *                                  https://cloud.google.com/apis/design/resource_names.
 *                                  For example:
 *                                  `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                  Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 * @param string $externalAddressId The user-provided identifier of the `ExternalAddress` to be
 *                                  created. This identifier must be unique among `ExternalAddress` resources
 *                                  within the parent and becomes the final token in the name URI. The
 *                                  identifier must meet the following requirements:
 *
 *                                  * Only contains 1-63 alphanumeric characters and hyphens
 *                                  * Begins with an alphabetical character
 *                                  * Ends with a non-hyphen character
 *                                  * Not formatted as a UUID
 *                                  * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                  (section 3.5)
 */
function create_external_address_sample(string $formattedParent, string $externalAddressId): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $externalAddress = new ExternalAddress();
    $request = (new CreateExternalAddressRequest())
        ->setParent($formattedParent)
        ->setExternalAddress($externalAddress)
        ->setExternalAddressId($externalAddressId);

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

        if ($response->operationSucceeded()) {
            /** @var ExternalAddress $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );
    $externalAddressId = '[EXTERNAL_ADDRESS_ID]';

    create_external_address_sample($formattedParent, $externalAddressId);
}

createHcxActivationKey

Creates a new HCX activation key in a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createHcxActivationKeyAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest;
use Google\Cloud\VmwareEngine\V1\HcxActivationKey;
use Google\Rpc\Status;

/**
 * @param string $formattedParent    The resource name of the private cloud to create the key for.
 *                                   Resource names are schemeless URIs that follow the conventions in
 *                                   https://cloud.google.com/apis/design/resource_names.
 *                                   For example:
 *                                   `projects/my-project/locations/us-central1/privateClouds/my-cloud`
 *                                   Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 * @param string $hcxActivationKeyId The user-provided identifier of the `HcxActivationKey` to be
 *                                   created. This identifier must be unique among `HcxActivationKey` resources
 *                                   within the parent and becomes the final token in the name URI.
 *                                   The identifier must meet the following requirements:
 *
 *                                   * Only contains 1-63 alphanumeric characters and hyphens
 *                                   * Begins with an alphabetical character
 *                                   * Ends with a non-hyphen character
 *                                   * Not formatted as a UUID
 *                                   * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                   (section 3.5)
 */
function create_hcx_activation_key_sample(
    string $formattedParent,
    string $hcxActivationKeyId
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $hcxActivationKey = new HcxActivationKey();
    $request = (new CreateHcxActivationKeyRequest())
        ->setParent($formattedParent)
        ->setHcxActivationKey($hcxActivationKey)
        ->setHcxActivationKeyId($hcxActivationKeyId);

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

        if ($response->operationSucceeded()) {
            /** @var HcxActivationKey $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );
    $hcxActivationKeyId = '[HCX_ACTIVATION_KEY_ID]';

    create_hcx_activation_key_sample($formattedParent, $hcxActivationKeyId);
}

createLoggingServer

Create a new logging server for a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createLoggingServerAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateLoggingServerRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateLoggingServerRequest;
use Google\Cloud\VmwareEngine\V1\LoggingServer;
use Google\Cloud\VmwareEngine\V1\LoggingServer\Protocol;
use Google\Cloud\VmwareEngine\V1\LoggingServer\SourceType;
use Google\Rpc\Status;

/**
 * @param string $formattedParent         The resource name of the private cloud
 *                                        to create a new Logging Server in.
 *                                        Resource names are schemeless URIs that follow the conventions in
 *                                        https://cloud.google.com/apis/design/resource_names.
 *                                        For example:
 *                                        `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                        Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 * @param string $loggingServerHostname   Fully-qualified domain name (FQDN) or IP Address of the logging
 *                                        server.
 * @param int    $loggingServerPort       Port number at which the logging server receives logs.
 * @param int    $loggingServerProtocol   Protocol used by vCenter to send logs to a logging server.
 * @param int    $loggingServerSourceType The type of component that produces logs that will be forwarded
 *                                        to this logging server.
 * @param string $loggingServerId         The user-provided identifier of the `LoggingServer` to be
 *                                        created. This identifier must be unique among `LoggingServer` resources
 *                                        within the parent and becomes the final token in the name URI.
 *                                        The identifier must meet the following requirements:
 *
 *                                        * Only contains 1-63 alphanumeric characters and hyphens
 *                                        * Begins with an alphabetical character
 *                                        * Ends with a non-hyphen character
 *                                        * Not formatted as a UUID
 *                                        * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                        (section 3.5)
 */
function create_logging_server_sample(
    string $formattedParent,
    string $loggingServerHostname,
    int $loggingServerPort,
    int $loggingServerProtocol,
    int $loggingServerSourceType,
    string $loggingServerId
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $loggingServer = (new LoggingServer())
        ->setHostname($loggingServerHostname)
        ->setPort($loggingServerPort)
        ->setProtocol($loggingServerProtocol)
        ->setSourceType($loggingServerSourceType);
    $request = (new CreateLoggingServerRequest())
        ->setParent($formattedParent)
        ->setLoggingServer($loggingServer)
        ->setLoggingServerId($loggingServerId);

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

        if ($response->operationSucceeded()) {
            /** @var LoggingServer $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );
    $loggingServerHostname = '[HOSTNAME]';
    $loggingServerPort = 0;
    $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED;
    $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED;
    $loggingServerId = '[LOGGING_SERVER_ID]';

    create_logging_server_sample(
        $formattedParent,
        $loggingServerHostname,
        $loggingServerPort,
        $loggingServerProtocol,
        $loggingServerSourceType,
        $loggingServerId
    );
}

createManagementDnsZoneBinding

Creates a new ManagementDnsZoneBinding resource in a private cloud.

This RPC creates the DNS binding and the resource that represents the DNS binding of the consumer VPC network to the management DNS zone. A management DNS zone is the Cloud DNS cross-project binding zone that VMware Engine creates for each private cloud. It contains FQDNs and corresponding IP addresses for the private cloud's ESXi hosts and management VM appliances like vCenter and NSX Manager.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createManagementDnsZoneBindingAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateManagementDnsZoneBindingRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateManagementDnsZoneBindingRequest;
use Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding;
use Google\Rpc\Status;

/**
 * @param string $formattedParent            The resource name of the private cloud
 *                                           to create a new management DNS zone binding for.
 *                                           Resource names are schemeless URIs that follow the conventions in
 *                                           https://cloud.google.com/apis/design/resource_names.
 *                                           For example:
 *                                           `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                           Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 * @param string $managementDnsZoneBindingId The user-provided identifier of the `ManagementDnsZoneBinding`
 *                                           resource to be created. This identifier must be unique among
 *                                           `ManagementDnsZoneBinding` resources within the parent and becomes the
 *                                           final token in the name URI. The identifier must meet the following
 *                                           requirements:
 *
 *                                           * Only contains 1-63 alphanumeric characters and hyphens
 *                                           * Begins with an alphabetical character
 *                                           * Ends with a non-hyphen character
 *                                           * Not formatted as a UUID
 *                                           * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                           (section 3.5)
 */
function create_management_dns_zone_binding_sample(
    string $formattedParent,
    string $managementDnsZoneBindingId
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $managementDnsZoneBinding = new ManagementDnsZoneBinding();
    $request = (new CreateManagementDnsZoneBindingRequest())
        ->setParent($formattedParent)
        ->setManagementDnsZoneBinding($managementDnsZoneBinding)
        ->setManagementDnsZoneBindingId($managementDnsZoneBindingId);

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

        if ($response->operationSucceeded()) {
            /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );
    $managementDnsZoneBindingId = '[MANAGEMENT_DNS_ZONE_BINDING_ID]';

    create_management_dns_zone_binding_sample($formattedParent, $managementDnsZoneBindingId);
}

createNetworkPeering

Creates a new network peering between the peer network and VMware Engine network provided in a NetworkPeering resource. NetworkPeering is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createNetworkPeeringAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateNetworkPeeringRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateNetworkPeeringRequest;
use Google\Cloud\VmwareEngine\V1\NetworkPeering;
use Google\Cloud\VmwareEngine\V1\NetworkPeering\PeerNetworkType;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                            The resource name of the location to create the new network
 *                                                           peering in. This value is always `global`, because `NetworkPeering` is a
 *                                                           global resource. Resource names are schemeless URIs that follow the
 *                                                           conventions in https://cloud.google.com/apis/design/resource_names. For
 *                                                           example: `projects/my-project/locations/global`
 *                                                           Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 * @param string $networkPeeringId                           The user-provided identifier of the new `NetworkPeering`.
 *                                                           This identifier must be unique among `NetworkPeering` resources within the
 *                                                           parent and becomes the final token in the name URI.
 *                                                           The identifier must meet the following requirements:
 *
 *                                                           * Only contains 1-63 alphanumeric characters and hyphens
 *                                                           * Begins with an alphabetical character
 *                                                           * Ends with a non-hyphen character
 *                                                           * Not formatted as a UUID
 *                                                           * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                                           (section 3.5)
 * @param string $networkPeeringPeerNetwork                  The relative resource name of the network to peer with
 *                                                           a standard VMware Engine network. The provided network can be a
 *                                                           consumer VPC network or another standard VMware Engine network. If the
 *                                                           `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
 *                                                           `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
 *                                                           Otherwise specify the name in the form:
 *                                                           `projects/{project}/global/networks/{network_id}`, where
 *                                                           `{project}` can either be a project number or a project ID.
 * @param int    $networkPeeringPeerNetworkType              The type of the network to peer with the VMware Engine network.
 * @param string $formattedNetworkPeeringVmwareEngineNetwork The relative resource name of the VMware Engine network.
 *                                                           Specify the name in the following form:
 *                                                           `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
 *                                                           where `{project}` can either be a project number or a project ID. Please see
 *                                                           {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field.
 */
function create_network_peering_sample(
    string $formattedParent,
    string $networkPeeringId,
    string $networkPeeringPeerNetwork,
    int $networkPeeringPeerNetworkType,
    string $formattedNetworkPeeringVmwareEngineNetwork
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $networkPeering = (new NetworkPeering())
        ->setPeerNetwork($networkPeeringPeerNetwork)
        ->setPeerNetworkType($networkPeeringPeerNetworkType)
        ->setVmwareEngineNetwork($formattedNetworkPeeringVmwareEngineNetwork);
    $request = (new CreateNetworkPeeringRequest())
        ->setParent($formattedParent)
        ->setNetworkPeeringId($networkPeeringId)
        ->setNetworkPeering($networkPeering);

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

        if ($response->operationSucceeded()) {
            /** @var NetworkPeering $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]');
    $networkPeeringId = '[NETWORK_PEERING_ID]';
    $networkPeeringPeerNetwork = '[PEER_NETWORK]';
    $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED;
    $formattedNetworkPeeringVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName(
        '[PROJECT]',
        '[LOCATION]',
        '[VMWARE_ENGINE_NETWORK]'
    );

    create_network_peering_sample(
        $formattedParent,
        $networkPeeringId,
        $networkPeeringPeerNetwork,
        $networkPeeringPeerNetworkType,
        $formattedNetworkPeeringVmwareEngineNetwork
    );
}

createNetworkPolicy

Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createNetworkPolicyAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest;
use Google\Cloud\VmwareEngine\V1\NetworkPolicy;
use Google\Rpc\Status;

/**
 * @param string $formattedParent               The resource name of the location (region)
 *                                              to create the new network policy in.
 *                                              Resource names are schemeless URIs that follow the conventions in
 *                                              https://cloud.google.com/apis/design/resource_names.
 *                                              For example:
 *                                              `projects/my-project/locations/us-central1`
 *                                              Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 * @param string $networkPolicyId               The user-provided identifier of the network policy to be created.
 *                                              This identifier must be unique within parent
 *                                              `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes
 *                                              the final token in the name URI.
 *                                              The identifier must meet the following requirements:
 *
 *                                              * Only contains 1-63 alphanumeric characters and hyphens
 *                                              * Begins with an alphabetical character
 *                                              * Ends with a non-hyphen character
 *                                              * Not formatted as a UUID
 *                                              * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                              (section 3.5)
 * @param string $networkPolicyEdgeServicesCidr IP address range in CIDR notation used to create internet access
 *                                              and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
 *                                              required. The range cannot overlap with any prefixes either in the consumer
 *                                              VPC network or in use by the private clouds attached to that VPC network.
 */
function create_network_policy_sample(
    string $formattedParent,
    string $networkPolicyId,
    string $networkPolicyEdgeServicesCidr
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $networkPolicy = (new NetworkPolicy())
        ->setEdgeServicesCidr($networkPolicyEdgeServicesCidr);
    $request = (new CreateNetworkPolicyRequest())
        ->setParent($formattedParent)
        ->setNetworkPolicyId($networkPolicyId)
        ->setNetworkPolicy($networkPolicy);

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

        if ($response->operationSucceeded()) {
            /** @var NetworkPolicy $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]');
    $networkPolicyId = '[NETWORK_POLICY_ID]';
    $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]';

    create_network_policy_sample($formattedParent, $networkPolicyId, $networkPolicyEdgeServicesCidr);
}

createPrivateCloud

Creates a new PrivateCloud resource in a given project and location.

Private clouds of type STANDARD and TIME_LIMITED are zonal resources, STRETCHED private clouds are regional. Creating a private cloud also creates a management cluster for that private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createPrivateCloudAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest;
use Google\Cloud\VmwareEngine\V1\NetworkConfig;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;
use Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                         The resource name of the location to create the new
 *                                                        private cloud in. Resource names are schemeless URIs that follow the
 *                                                        conventions in https://cloud.google.com/apis/design/resource_names.
 *                                                        For example:
 *                                                        `projects/my-project/locations/us-central1-a`
 *                                                        Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 * @param string $privateCloudId                          The user-provided identifier of the private cloud to be created.
 *                                                        This identifier must be unique among each `PrivateCloud` within the parent
 *                                                        and becomes the final token in the name URI.
 *                                                        The identifier must meet the following requirements:
 *
 *                                                        * Only contains 1-63 alphanumeric characters and hyphens
 *                                                        * Begins with an alphabetical character
 *                                                        * Ends with a non-hyphen character
 *                                                        * Not formatted as a UUID
 *                                                        * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                                        (section 3.5)
 * @param string $privateCloudNetworkConfigManagementCidr Management CIDR used by VMware management appliances.
 * @param string $privateCloudManagementClusterClusterId  The user-provided identifier of the new `Cluster`.
 *                                                        The identifier must meet the following requirements:
 *
 *                                                        * Only contains 1-63 alphanumeric characters and hyphens
 *                                                        * Begins with an alphabetical character
 *                                                        * Ends with a non-hyphen character
 *                                                        * Not formatted as a UUID
 *                                                        * Complies with [RFC
 *                                                        1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
 */
function create_private_cloud_sample(
    string $formattedParent,
    string $privateCloudId,
    string $privateCloudNetworkConfigManagementCidr,
    string $privateCloudManagementClusterClusterId
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $privateCloudNetworkConfig = (new NetworkConfig())
        ->setManagementCidr($privateCloudNetworkConfigManagementCidr);
    $privateCloudManagementClusterNodeTypeConfigs = [];
    $privateCloudManagementCluster = (new ManagementCluster())
        ->setClusterId($privateCloudManagementClusterClusterId)
        ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs);
    $privateCloud = (new PrivateCloud())
        ->setNetworkConfig($privateCloudNetworkConfig)
        ->setManagementCluster($privateCloudManagementCluster);
    $request = (new CreatePrivateCloudRequest())
        ->setParent($formattedParent)
        ->setPrivateCloudId($privateCloudId)
        ->setPrivateCloud($privateCloud);

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

        if ($response->operationSucceeded()) {
            /** @var PrivateCloud $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]');
    $privateCloudId = '[PRIVATE_CLOUD_ID]';
    $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]';
    $privateCloudManagementClusterClusterId = '[CLUSTER_ID]';

    create_private_cloud_sample(
        $formattedParent,
        $privateCloudId,
        $privateCloudNetworkConfigManagementCidr,
        $privateCloudManagementClusterClusterId
    );
}

createPrivateConnection

Creates a new private connection that can be used for accessing private Clouds.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createPrivateConnectionAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreatePrivateConnectionRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreatePrivateConnectionRequest;
use Google\Cloud\VmwareEngine\V1\PrivateConnection;
use Google\Cloud\VmwareEngine\V1\PrivateConnection\Type;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                               The resource name of the location to create the new private
 *                                                              connection in. Private connection is a regional resource.
 *                                                              Resource names are schemeless URIs that follow the conventions in
 *                                                              https://cloud.google.com/apis/design/resource_names. For example:
 *                                                              `projects/my-project/locations/us-central1`
 *                                                              Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 * @param string $privateConnectionId                           The user-provided identifier of the new private connection.
 *                                                              This identifier must be unique among private connection resources
 *                                                              within the parent and becomes the final token in the name URI. The
 *                                                              identifier must meet the following requirements:
 *
 *                                                              * Only contains 1-63 alphanumeric characters and hyphens
 *                                                              * Begins with an alphabetical character
 *                                                              * Ends with a non-hyphen character
 *                                                              * Not formatted as a UUID
 *                                                              * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                                              (section 3.5)
 * @param string $formattedPrivateConnectionVmwareEngineNetwork The relative resource name of Legacy VMware Engine network.
 *                                                              Specify the name in the following form:
 *                                                              `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
 *                                                              where `{project}`, `{location}` will be same as specified in private
 *                                                              connection resource name and `{vmware_engine_network_id}` will be in the
 *                                                              form of `{location}`-default e.g.
 *                                                              projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. Please see
 *                                                              {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field.
 * @param int    $privateConnectionType                         Private connection type.
 * @param string $formattedPrivateConnectionServiceNetwork      Service network to create private connection.
 *                                                              Specify the name in the following form:
 *                                                              `projects/{project}/global/networks/{network_id}`
 *                                                              For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
 *                                                              VPC, e.g. projects/project-tp/global/networks/servicenetworking.
 *                                                              For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
 *                                                              e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
 *                                                              For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
 *                                                              projects/project-tp/global/networks/dell-tenant-vpc.
 *                                                              For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
 *                                                              any other producer VPC to which the VMware Engine Network needs to be
 *                                                              connected, e.g. projects/project/global/networks/vpc. Please see
 *                                                              {@see VmwareEngineClient::networkName()} for help formatting this field.
 */
function create_private_connection_sample(
    string $formattedParent,
    string $privateConnectionId,
    string $formattedPrivateConnectionVmwareEngineNetwork,
    int $privateConnectionType,
    string $formattedPrivateConnectionServiceNetwork
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $privateConnection = (new PrivateConnection())
        ->setVmwareEngineNetwork($formattedPrivateConnectionVmwareEngineNetwork)
        ->setType($privateConnectionType)
        ->setServiceNetwork($formattedPrivateConnectionServiceNetwork);
    $request = (new CreatePrivateConnectionRequest())
        ->setParent($formattedParent)
        ->setPrivateConnectionId($privateConnectionId)
        ->setPrivateConnection($privateConnection);

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

        if ($response->operationSucceeded()) {
            /** @var PrivateConnection $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]');
    $privateConnectionId = '[PRIVATE_CONNECTION_ID]';
    $formattedPrivateConnectionVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName(
        '[PROJECT]',
        '[LOCATION]',
        '[VMWARE_ENGINE_NETWORK]'
    );
    $privateConnectionType = Type::TYPE_UNSPECIFIED;
    $formattedPrivateConnectionServiceNetwork = VmwareEngineClient::networkName(
        '[PROJECT]',
        '[NETWORK]'
    );

    create_private_connection_sample(
        $formattedParent,
        $privateConnectionId,
        $formattedPrivateConnectionVmwareEngineNetwork,
        $privateConnectionType,
        $formattedPrivateConnectionServiceNetwork
    );
}

createVmwareEngineNetwork

Creates a new VMware Engine network that can be used by a private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::createVmwareEngineNetworkAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest;
use Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork;
use Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type;
use Google\Rpc\Status;

/**
 * @param string $formattedParent         The resource name of the location to create the new VMware Engine
 *                                        network in. A VMware Engine network of type
 *                                        `LEGACY` is a regional resource, and a VMware
 *                                        Engine network of type `STANDARD` is a global resource.
 *                                        Resource names are schemeless URIs that follow the conventions in
 *                                        https://cloud.google.com/apis/design/resource_names. For example:
 *                                        `projects/my-project/locations/global`
 *                                        Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 * @param string $vmwareEngineNetworkId   The user-provided identifier of the new VMware Engine network.
 *                                        This identifier must be unique among VMware Engine network resources
 *                                        within the parent and becomes the final token in the name URI. The
 *                                        identifier must meet the following requirements:
 *
 *                                        * For networks of type LEGACY, adheres to the format:
 *                                        `{region-id}-default`. Replace `{region-id}` with the region where you want
 *                                        to create the VMware Engine network. For example, "us-central1-default".
 *                                        * Only contains 1-63 alphanumeric characters and hyphens
 *                                        * Begins with an alphabetical character
 *                                        * Ends with a non-hyphen character
 *                                        * Not formatted as a UUID
 *                                        * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
 *                                        (section 3.5)
 * @param int    $vmwareEngineNetworkType VMware Engine network type.
 */
function create_vmware_engine_network_sample(
    string $formattedParent,
    string $vmwareEngineNetworkId,
    int $vmwareEngineNetworkType
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $vmwareEngineNetwork = (new VmwareEngineNetwork())
        ->setType($vmwareEngineNetworkType);
    $request = (new CreateVmwareEngineNetworkRequest())
        ->setParent($formattedParent)
        ->setVmwareEngineNetworkId($vmwareEngineNetworkId)
        ->setVmwareEngineNetwork($vmwareEngineNetwork);

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

        if ($response->operationSucceeded()) {
            /** @var VmwareEngineNetwork $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]');
    $vmwareEngineNetworkId = '[VMWARE_ENGINE_NETWORK_ID]';
    $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED;

    create_vmware_engine_network_sample(
        $formattedParent,
        $vmwareEngineNetworkId,
        $vmwareEngineNetworkType
    );
}

deleteCluster

Deletes a Cluster resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion.

You cannot delete the management cluster of a private cloud using this method.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteClusterAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteClusterRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteClusterRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the cluster to delete.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
 *                              Please see {@see VmwareEngineClient::clusterName()} for help formatting this field.
 */
function delete_cluster_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteCluster($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 = VmwareEngineClient::clusterName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[CLUSTER]'
    );

    delete_cluster_sample($formattedName);
}

deleteExternalAccessRule

Deletes a single external access rule.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteExternalAccessRuleAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteExternalAccessRuleRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteExternalAccessRuleRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the external access firewall rule to delete.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
 *                              Please see {@see VmwareEngineClient::externalAccessRuleName()} for help formatting this field.
 */
function delete_external_access_rule_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteExternalAccessRule($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 = VmwareEngineClient::externalAccessRuleName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_POLICY]',
        '[EXTERNAL_ACCESS_RULE]'
    );

    delete_external_access_rule_sample($formattedName);
}

deleteExternalAddress

Deletes a single external IP address. When you delete an external IP address, connectivity between the external IP address and the corresponding internal IP address is lost.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteExternalAddressAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteExternalAddressRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteExternalAddressRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the external IP address to delete.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
 *                              Please see {@see VmwareEngineClient::externalAddressName()} for help formatting this field.
 */
function delete_external_address_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteExternalAddress($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 = VmwareEngineClient::externalAddressName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[EXTERNAL_ADDRESS]'
    );

    delete_external_address_sample($formattedName);
}

deleteLoggingServer

Deletes a single logging server.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteLoggingServerAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteLoggingServerRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteLoggingServerRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the logging server to delete.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
 *                              Please see {@see VmwareEngineClient::loggingServerName()} for help formatting this field.
 */
function delete_logging_server_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteLoggingServer($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 = VmwareEngineClient::loggingServerName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[LOGGING_SERVER]'
    );

    delete_logging_server_sample($formattedName);
}

deleteManagementDnsZoneBinding

Deletes a ManagementDnsZoneBinding resource. When a management DNS zone binding is deleted, the corresponding consumer VPC network is no longer bound to the management DNS zone.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteManagementDnsZoneBindingAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteManagementDnsZoneBindingRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteManagementDnsZoneBindingRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the management DNS zone binding to delete.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
 *                              Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field.
 */
function delete_management_dns_zone_binding_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteManagementDnsZoneBinding($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 = VmwareEngineClient::managementDnsZoneBindingName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[MANAGEMENT_DNS_ZONE_BINDING]'
    );

    delete_management_dns_zone_binding_sample($formattedName);
}

deleteNetworkPeering

Deletes a NetworkPeering resource. When a network peering is deleted for a VMware Engine network, the peer network becomes inaccessible to that VMware Engine network. NetworkPeering is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteNetworkPeeringAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteNetworkPeeringRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteNetworkPeeringRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the network peering to be deleted.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/global/networkPeerings/my-peering`
 *                              Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field.
 */
function delete_network_peering_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteNetworkPeering($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 = VmwareEngineClient::networkPeeringName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_PEERING]'
    );

    delete_network_peering_sample($formattedName);
}

deleteNetworkPolicy

Deletes a NetworkPolicy resource. A network policy cannot be deleted when NetworkService.state is set to RECONCILING for either its external IP or internet access service.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteNetworkPolicyAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the network policy to delete.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
 *                              Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field.
 */
function delete_network_policy_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteNetworkPolicy($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 = VmwareEngineClient::networkPolicyName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_POLICY]'
    );

    delete_network_policy_sample($formattedName);
}

deletePrivateCloud

Schedules a PrivateCloud resource for deletion.

A PrivateCloud resource scheduled for deletion has PrivateCloud.state set to DELETED and expireTime set to the time when deletion is final and can no longer be reversed. The delete operation is marked as done as soon as the PrivateCloud is successfully scheduled for deletion (this also applies when delayHours is set to zero), and the operation is not kept in pending state until PrivateCloud is purged. PrivateCloud can be restored using UndeletePrivateCloud method before the expireTime elapses. When expireTime is reached, deletion is final and all private cloud resources are irreversibly removed and billing stops. During the final removal process, PrivateCloud.state is set to PURGING. PrivateCloud can be polled using standard GET method for the whole period of deletion and purging. It will not be returned only when it is completely purged.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deletePrivateCloudAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the private cloud to delete.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                              Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function delete_private_cloud_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        if ($response->operationSucceeded()) {
            /** @var PrivateCloud $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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]');

    delete_private_cloud_sample($formattedName);
}

deletePrivateConnection

Deletes a PrivateConnection resource. When a private connection is deleted for a VMware Engine network, the connected network becomes inaccessible to that VMware Engine network.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deletePrivateConnectionAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeletePrivateConnectionRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeletePrivateConnectionRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the private connection to be deleted.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1/privateConnections/my-connection`
 *                              Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field.
 */
function delete_private_connection_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deletePrivateConnection($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 = VmwareEngineClient::privateConnectionName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CONNECTION]'
    );

    delete_private_connection_sample($formattedName);
}

deleteVmwareEngineNetwork

Deletes a VmwareEngineNetwork resource. You can only delete a VMware Engine network after all resources that refer to it are deleted. For example, a private cloud, a network peering, and a network policy can all refer to the same VMware Engine network.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::deleteVmwareEngineNetworkAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the VMware Engine network to be deleted.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
 *                              Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field.
 */
function delete_vmware_engine_network_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $vmwareEngineClient->deleteVmwareEngineNetwork($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 = VmwareEngineClient::vmwareEngineNetworkName(
        '[PROJECT]',
        '[LOCATION]',
        '[VMWARE_ENGINE_NETWORK]'
    );

    delete_vmware_engine_network_sample($formattedName);
}

fetchNetworkPolicyExternalAddresses

Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::fetchNetworkPolicyExternalAddressesAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\FetchNetworkPolicyExternalAddressesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ExternalAddress;
use Google\Cloud\VmwareEngine\V1\FetchNetworkPolicyExternalAddressesRequest;

/**
 * @param string $formattedNetworkPolicy The resource name of the network policy to query for assigned
 *                                       external IP addresses. Resource names are schemeless URIs that follow the
 *                                       conventions in https://cloud.google.com/apis/design/resource_names. For
 *                                       example:
 *                                       `projects/my-project/locations/us-central1/networkPolicies/my-policy`
 *                                       Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field.
 */
function fetch_network_policy_external_addresses_sample(string $formattedNetworkPolicy): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $request = (new FetchNetworkPolicyExternalAddressesRequest())
        ->setNetworkPolicy($formattedNetworkPolicy);

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

        /** @var ExternalAddress $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
{
    $formattedNetworkPolicy = VmwareEngineClient::networkPolicyName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_POLICY]'
    );

    fetch_network_policy_external_addresses_sample($formattedNetworkPolicy);
}

getCluster

Retrieves a Cluster resource by its resource name.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getClusterAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetClusterRequest

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\VmwareEngine\V1\Cluster
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\Cluster;
use Google\Cloud\VmwareEngine\V1\GetClusterRequest;

/**
 * @param string $formattedName The cluster resource name to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
 *                              Please see {@see VmwareEngineClient::clusterName()} for help formatting this field.
 */
function get_cluster_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Cluster $response */
        $response = $vmwareEngineClient->getCluster($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 = VmwareEngineClient::clusterName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[CLUSTER]'
    );

    get_cluster_sample($formattedName);
}

getDnsBindPermission

Gets all the principals having bind permission on the intranet VPC associated with the consumer project granted by the Grant API.

DnsBindPermission is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getDnsBindPermissionAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetDnsBindPermissionRequest

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\VmwareEngine\V1\DnsBindPermission
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DnsBindPermission;
use Google\Cloud\VmwareEngine\V1\GetDnsBindPermissionRequest;

/**
 * @param string $formattedName The name of the resource which stores the users/service accounts
 *                              having the permission to bind to the corresponding intranet VPC of the
 *                              consumer project. DnsBindPermission is a global resource. Resource names
 *                              are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names. For example:
 *                              `projects/my-project/locations/global/dnsBindPermission`
 *                              Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field.
 */
function get_dns_bind_permission_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var DnsBindPermission $response */
        $response = $vmwareEngineClient->getDnsBindPermission($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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]');

    get_dns_bind_permission_sample($formattedName);
}

getDnsForwarding

Gets details of the DnsForwarding config.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getDnsForwardingAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetDnsForwardingRequest

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\VmwareEngine\V1\DnsForwarding
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DnsForwarding;
use Google\Cloud\VmwareEngine\V1\GetDnsForwardingRequest;

/**
 * @param string $formattedName The resource name of a `DnsForwarding` to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
 *                              Please see {@see VmwareEngineClient::dnsForwardingName()} for help formatting this field.
 */
function get_dns_forwarding_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var DnsForwarding $response */
        $response = $vmwareEngineClient->getDnsForwarding($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 = VmwareEngineClient::dnsForwardingName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    get_dns_forwarding_sample($formattedName);
}

getExternalAccessRule

Gets details of a single external access rule.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getExternalAccessRuleAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetExternalAccessRuleRequest

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\VmwareEngine\V1\ExternalAccessRule
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ExternalAccessRule;
use Google\Cloud\VmwareEngine\V1\GetExternalAccessRuleRequest;

/**
 * @param string $formattedName The resource name of the external access firewall rule to
 *                              retrieve. Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
 *                              Please see {@see VmwareEngineClient::externalAccessRuleName()} for help formatting this field.
 */
function get_external_access_rule_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ExternalAccessRule $response */
        $response = $vmwareEngineClient->getExternalAccessRule($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 = VmwareEngineClient::externalAccessRuleName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_POLICY]',
        '[EXTERNAL_ACCESS_RULE]'
    );

    get_external_access_rule_sample($formattedName);
}

getExternalAddress

Gets details of a single external IP address.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getExternalAddressAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetExternalAddressRequest

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\VmwareEngine\V1\ExternalAddress
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ExternalAddress;
use Google\Cloud\VmwareEngine\V1\GetExternalAddressRequest;

/**
 * @param string $formattedName The resource name of the external IP address to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
 *                              Please see {@see VmwareEngineClient::externalAddressName()} for help formatting this field.
 */
function get_external_address_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ExternalAddress $response */
        $response = $vmwareEngineClient->getExternalAddress($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 = VmwareEngineClient::externalAddressName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[EXTERNAL_ADDRESS]'
    );

    get_external_address_sample($formattedName);
}

getHcxActivationKey

Retrieves a HcxActivationKey resource by its resource name.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getHcxActivationKeyAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest

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\VmwareEngine\V1\HcxActivationKey
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest;
use Google\Cloud\VmwareEngine\V1\HcxActivationKey;

/**
 * @param string $formattedName The resource name of the HCX activation key to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
 *                              Please see {@see VmwareEngineClient::hcxActivationKeyName()} for help formatting this field.
 */
function get_hcx_activation_key_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var HcxActivationKey $response */
        $response = $vmwareEngineClient->getHcxActivationKey($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 = VmwareEngineClient::hcxActivationKeyName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[HCX_ACTIVATION_KEY]'
    );

    get_hcx_activation_key_sample($formattedName);
}

getLoggingServer

Gets details of a logging server.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getLoggingServerAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetLoggingServerRequest

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\VmwareEngine\V1\LoggingServer
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetLoggingServerRequest;
use Google\Cloud\VmwareEngine\V1\LoggingServer;

/**
 * @param string $formattedName The resource name of the Logging Server to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
 *                              Please see {@see VmwareEngineClient::loggingServerName()} for help formatting this field.
 */
function get_logging_server_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var LoggingServer $response */
        $response = $vmwareEngineClient->getLoggingServer($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 = VmwareEngineClient::loggingServerName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[LOGGING_SERVER]'
    );

    get_logging_server_sample($formattedName);
}

getManagementDnsZoneBinding

Retrieves a 'ManagementDnsZoneBinding' resource by its resource name.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getManagementDnsZoneBindingAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetManagementDnsZoneBindingRequest

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\VmwareEngine\V1\ManagementDnsZoneBinding
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetManagementDnsZoneBindingRequest;
use Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding;

/**
 * @param string $formattedName The resource name of the management DNS zone binding to
 *                              retrieve. Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
 *                              Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field.
 */
function get_management_dns_zone_binding_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ManagementDnsZoneBinding $response */
        $response = $vmwareEngineClient->getManagementDnsZoneBinding($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 = VmwareEngineClient::managementDnsZoneBindingName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[MANAGEMENT_DNS_ZONE_BINDING]'
    );

    get_management_dns_zone_binding_sample($formattedName);
}

getNetworkPeering

Retrieves a NetworkPeering resource by its resource name. The resource contains details of the network peering, such as peered networks, import and export custom route configurations, and peering state.

NetworkPeering is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getNetworkPeeringAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetNetworkPeeringRequest

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\VmwareEngine\V1\NetworkPeering
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetNetworkPeeringRequest;
use Google\Cloud\VmwareEngine\V1\NetworkPeering;

/**
 * @param string $formattedName The resource name of the network peering to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/global/networkPeerings/my-peering`
 *                              Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field.
 */
function get_network_peering_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var NetworkPeering $response */
        $response = $vmwareEngineClient->getNetworkPeering($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 = VmwareEngineClient::networkPeeringName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_PEERING]'
    );

    get_network_peering_sample($formattedName);
}

getNetworkPolicy

Retrieves a NetworkPolicy resource by its resource name.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getNetworkPolicyAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest

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\VmwareEngine\V1\NetworkPolicy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest;
use Google\Cloud\VmwareEngine\V1\NetworkPolicy;

/**
 * @param string $formattedName The resource name of the network policy to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
 *                              Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field.
 */
function get_network_policy_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var NetworkPolicy $response */
        $response = $vmwareEngineClient->getNetworkPolicy($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 = VmwareEngineClient::networkPolicyName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_POLICY]'
    );

    get_network_policy_sample($formattedName);
}

getNode

Gets details of a single node.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getNodeAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetNodeRequest

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\VmwareEngine\V1\Node
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetNodeRequest;
use Google\Cloud\VmwareEngine\V1\Node;

/**
 * @param string $formattedName The resource name of the node to retrieve.
 *                              For example:
 *                              `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`
 *                              Please see {@see VmwareEngineClient::nodeName()} for help formatting this field.
 */
function get_node_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Node $response */
        $response = $vmwareEngineClient->getNode($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 = VmwareEngineClient::nodeName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[CLUSTER]',
        '[NODE]'
    );

    get_node_sample($formattedName);
}

getNodeType

Gets details of a single NodeType.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getNodeTypeAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest

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\VmwareEngine\V1\NodeType
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest;
use Google\Cloud\VmwareEngine\V1\NodeType;

/**
 * @param string $formattedName The resource name of the node type to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
 *                              Please see {@see VmwareEngineClient::nodeTypeName()} for help formatting this field.
 */
function get_node_type_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var NodeType $response */
        $response = $vmwareEngineClient->getNodeType($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 = VmwareEngineClient::nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]');

    get_node_type_sample($formattedName);
}

getPrivateCloud

Retrieves a PrivateCloud resource by its resource name.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getPrivateCloudAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest

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\VmwareEngine\V1\PrivateCloud
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;

/**
 * @param string $formattedName The resource name of the private cloud to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                              Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function get_private_cloud_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var PrivateCloud $response */
        $response = $vmwareEngineClient->getPrivateCloud($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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]');

    get_private_cloud_sample($formattedName);
}

getPrivateConnection

Retrieves a PrivateConnection resource by its resource name. The resource contains details of the private connection, such as connected network, routing mode and state.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getPrivateConnectionAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetPrivateConnectionRequest

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\VmwareEngine\V1\PrivateConnection
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetPrivateConnectionRequest;
use Google\Cloud\VmwareEngine\V1\PrivateConnection;

/**
 * @param string $formattedName The resource name of the private connection to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1/privateConnections/my-connection`
 *                              Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field.
 */
function get_private_connection_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var PrivateConnection $response */
        $response = $vmwareEngineClient->getPrivateConnection($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 = VmwareEngineClient::privateConnectionName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CONNECTION]'
    );

    get_private_connection_sample($formattedName);
}

getSubnet

Gets details of a single subnet.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getSubnetAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetSubnetRequest

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\VmwareEngine\V1\Subnet
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetSubnetRequest;
use Google\Cloud\VmwareEngine\V1\Subnet;

/**
 * @param string $formattedName The resource name of the subnet to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
 *                              Please see {@see VmwareEngineClient::subnetName()} for help formatting this field.
 */
function get_subnet_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Subnet $response */
        $response = $vmwareEngineClient->getSubnet($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 = VmwareEngineClient::subnetName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[SUBNET]'
    );

    get_subnet_sample($formattedName);
}

getVmwareEngineNetwork

Retrieves a VmwareEngineNetwork resource by its resource name. The resource contains details of the VMware Engine network, such as its VMware Engine network type, peered networks in a service project, and state (for example, CREATING, ACTIVE, DELETING).

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::getVmwareEngineNetworkAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest

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\VmwareEngine\V1\VmwareEngineNetwork
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest;
use Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork;

/**
 * @param string $formattedName The resource name of the VMware Engine network to retrieve.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
 *                              Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field.
 */
function get_vmware_engine_network_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var VmwareEngineNetwork $response */
        $response = $vmwareEngineClient->getVmwareEngineNetwork($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 = VmwareEngineClient::vmwareEngineNetworkName(
        '[PROJECT]',
        '[LOCATION]',
        '[VMWARE_ENGINE_NETWORK]'
    );

    get_vmware_engine_network_sample($formattedName);
}

grantDnsBindPermission

Grants the bind permission to the customer provided principal(user / service account) to bind their DNS zone with the intranet VPC associated with the project. DnsBindPermission is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::grantDnsBindPermissionAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\GrantDnsBindPermissionRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DnsBindPermission;
use Google\Cloud\VmwareEngine\V1\GrantDnsBindPermissionRequest;
use Google\Cloud\VmwareEngine\V1\Principal;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the resource which stores the users/service accounts
 *                              having the permission to bind to the corresponding intranet VPC of the
 *                              consumer project. DnsBindPermission is a global resource. Resource names
 *                              are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names. For example:
 *                              `projects/my-project/locations/global/dnsBindPermission`
 *                              Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field.
 */
function grant_dns_bind_permission_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $principal = new Principal();
    $request = (new GrantDnsBindPermissionRequest())
        ->setName($formattedName)
        ->setPrincipal($principal);

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

        if ($response->operationSucceeded()) {
            /** @var DnsBindPermission $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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]');

    grant_dns_bind_permission_sample($formattedName);
}

listClusters

Lists Cluster resources in a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listClustersAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListClustersRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\Cluster;
use Google\Cloud\VmwareEngine\V1\ListClustersRequest;

/**
 * @param string $formattedParent The resource name of the private cloud to query for clusters.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function list_clusters_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var Cluster $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    list_clusters_sample($formattedParent);
}

listExternalAccessRules

Lists ExternalAccessRule resources in the specified network policy.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listExternalAccessRulesAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListExternalAccessRulesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ExternalAccessRule;
use Google\Cloud\VmwareEngine\V1\ListExternalAccessRulesRequest;

/**
 * @param string $formattedParent The resource name of the network policy to query for external
 *                                access firewall rules. Resource names are schemeless URIs that follow the
 *                                conventions in https://cloud.google.com/apis/design/resource_names. For
 *                                example:
 *                                `projects/my-project/locations/us-central1/networkPolicies/my-policy`
 *                                Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field.
 */
function list_external_access_rules_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var ExternalAccessRule $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 = VmwareEngineClient::networkPolicyName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_POLICY]'
    );

    list_external_access_rules_sample($formattedParent);
}

listExternalAddresses

Lists external IP addresses assigned to VMware workload VMs in a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listExternalAddressesAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListExternalAddressesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ExternalAddress;
use Google\Cloud\VmwareEngine\V1\ListExternalAddressesRequest;

/**
 * @param string $formattedParent The resource name of the private cloud to be queried for
 *                                external IP addresses.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function list_external_addresses_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var ExternalAddress $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    list_external_addresses_sample($formattedParent);
}

listHcxActivationKeys

Lists HcxActivationKey resources in a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listHcxActivationKeysAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\HcxActivationKey;
use Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest;

/**
 * @param string $formattedParent The resource name of the private cloud
 *                                to be queried for HCX activation keys.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1/privateClouds/my-cloud`
 *                                Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function list_hcx_activation_keys_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var HcxActivationKey $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    list_hcx_activation_keys_sample($formattedParent);
}

listLoggingServers

Lists logging servers configured for a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listLoggingServersAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListLoggingServersRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListLoggingServersRequest;
use Google\Cloud\VmwareEngine\V1\LoggingServer;

/**
 * @param string $formattedParent The resource name of the private cloud to be queried for
 *                                logging servers.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function list_logging_servers_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var LoggingServer $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    list_logging_servers_sample($formattedParent);
}

listManagementDnsZoneBindings

Lists Consumer VPCs bound to Management DNS Zone of a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listManagementDnsZoneBindingsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListManagementDnsZoneBindingsRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListManagementDnsZoneBindingsRequest;
use Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding;

/**
 * @param string $formattedParent The resource name of the private cloud to be queried for
 *                                management DNS zone bindings.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function list_management_dns_zone_bindings_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    list_management_dns_zone_bindings_sample($formattedParent);
}

listNetworkPeerings

Lists NetworkPeering resources in a given project. NetworkPeering is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listNetworkPeeringsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListNetworkPeeringsRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListNetworkPeeringsRequest;
use Google\Cloud\VmwareEngine\V1\NetworkPeering;

/**
 * @param string $formattedParent The resource name of the location (global) to query for
 *                                network peerings. Resource names are schemeless URIs that follow the
 *                                conventions in https://cloud.google.com/apis/design/resource_names. For
 *                                example: `projects/my-project/locations/global`
 *                                Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 */
function list_network_peerings_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

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

    list_network_peerings_sample($formattedParent);
}

listNetworkPolicies

Lists NetworkPolicy resources in a specified project and location.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listNetworkPoliciesAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest;
use Google\Cloud\VmwareEngine\V1\NetworkPolicy;

/**
 * @param string $formattedParent The resource name of the location (region) to query for
 *                                network policies. Resource names are schemeless URIs that follow the
 *                                conventions in https://cloud.google.com/apis/design/resource_names. For
 *                                example: `projects/my-project/locations/us-central1`
 *                                Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 */
function list_network_policies_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

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

    list_network_policies_sample($formattedParent);
}

listNodeTypes

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest;
use Google\Cloud\VmwareEngine\V1\NodeType;

/**
 * @param string $formattedParent The resource name of the location to be queried for node types.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a`
 *                                Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 */
function list_node_types_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

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

    list_node_types_sample($formattedParent);
}

listNodes

Lists nodes in a given cluster.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listNodesAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListNodesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListNodesRequest;
use Google\Cloud\VmwareEngine\V1\Node;

/**
 * @param string $formattedParent The resource name of the cluster to be queried for nodes.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
 *                                Please see {@see VmwareEngineClient::clusterName()} for help formatting this field.
 */
function list_nodes_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var Node $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 = VmwareEngineClient::clusterName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[CLUSTER]'
    );

    list_nodes_sample($formattedParent);
}

listPeeringRoutes

Lists the network peering routes exchanged over a peering connection.

NetworkPeering is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listPeeringRoutesAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListPeeringRoutesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListPeeringRoutesRequest;
use Google\Cloud\VmwareEngine\V1\PeeringRoute;

/**
 * @param string $formattedParent The resource name of the network peering to retrieve peering
 *                                routes from. Resource names are schemeless URIs that follow the conventions
 *                                in https://cloud.google.com/apis/design/resource_names. For example:
 *                                `projects/my-project/locations/global/networkPeerings/my-peering`
 *                                Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field.
 */
function list_peering_routes_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var PeeringRoute $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 = VmwareEngineClient::networkPeeringName(
        '[PROJECT]',
        '[LOCATION]',
        '[NETWORK_PEERING]'
    );

    list_peering_routes_sample($formattedParent);
}

listPrivateClouds

Lists PrivateCloud resources in a given project and location.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listPrivateCloudsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListPrivateCloudsRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListPrivateCloudsRequest;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;

/**
 * @param string $formattedParent The resource name of the private cloud to be queried for
 *                                clusters. Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a`
 *                                Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 */
function list_private_clouds_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

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

    list_private_clouds_sample($formattedParent);
}

listPrivateConnectionPeeringRoutes

Lists the private connection routes exchanged over a peering connection.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listPrivateConnectionPeeringRoutesAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListPrivateConnectionPeeringRoutesRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListPrivateConnectionPeeringRoutesRequest;
use Google\Cloud\VmwareEngine\V1\PeeringRoute;

/**
 * @param string $formattedParent The resource name of the private connection to retrieve peering
 *                                routes from. Resource names are schemeless URIs that follow the conventions
 *                                in https://cloud.google.com/apis/design/resource_names. For example:
 *                                `projects/my-project/locations/us-west1/privateConnections/my-connection`
 *                                Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field.
 */
function list_private_connection_peering_routes_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var PeeringRoute $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 = VmwareEngineClient::privateConnectionName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CONNECTION]'
    );

    list_private_connection_peering_routes_sample($formattedParent);
}

listPrivateConnections

Lists PrivateConnection resources in a given project and location.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listPrivateConnectionsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListPrivateConnectionsRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListPrivateConnectionsRequest;
use Google\Cloud\VmwareEngine\V1\PrivateConnection;

/**
 * @param string $formattedParent The resource name of the location to query for
 *                                private connections. Resource names are schemeless URIs that follow the
 *                                conventions in https://cloud.google.com/apis/design/resource_names. For
 *                                example: `projects/my-project/locations/us-central1`
 *                                Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 */
function list_private_connections_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

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

    list_private_connections_sample($formattedParent);
}

listSubnets

Lists subnets in a given private cloud.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listSubnetsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListSubnetsRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListSubnetsRequest;
use Google\Cloud\VmwareEngine\V1\Subnet;

/**
 * @param string $formattedParent The resource name of the private cloud to be queried for
 *                                subnets.
 *                                Resource names are schemeless URIs that follow the conventions in
 *                                https://cloud.google.com/apis/design/resource_names.
 *                                For example:
 *                                `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function list_subnets_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        /** @var Subnet $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 = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    list_subnets_sample($formattedParent);
}

listVmwareEngineNetworks

Lists VmwareEngineNetwork resources in a given project and location.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::listVmwareEngineNetworksAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest;
use Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork;

/**
 * @param string $formattedParent The resource name of the location to query for
 *                                VMware Engine networks. Resource names are schemeless URIs that follow the
 *                                conventions in https://cloud.google.com/apis/design/resource_names. For
 *                                example: `projects/my-project/locations/global`
 *                                Please see {@see VmwareEngineClient::locationName()} for help formatting this field.
 */
function list_vmware_engine_networks_sample(string $formattedParent): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

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

    list_vmware_engine_networks_sample($formattedParent);
}

repairManagementDnsZoneBinding

Retries to create a ManagementDnsZoneBinding resource that is in failed state.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::repairManagementDnsZoneBindingAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\RepairManagementDnsZoneBindingRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding;
use Google\Cloud\VmwareEngine\V1\RepairManagementDnsZoneBindingRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the management DNS zone binding to repair.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
 *                              Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field.
 */
function repair_management_dns_zone_binding_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        if ($response->operationSucceeded()) {
            /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::managementDnsZoneBindingName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]',
        '[MANAGEMENT_DNS_ZONE_BINDING]'
    );

    repair_management_dns_zone_binding_sample($formattedName);
}

resetNsxCredentials

Resets credentials of the NSX appliance.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::resetNsxCredentialsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;
use Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedPrivateCloud The resource name of the private cloud
 *                                      to reset credentials for.
 *                                      Resource names are schemeless URIs that follow the conventions in
 *                                      https://cloud.google.com/apis/design/resource_names.
 *                                      For example:
 *                                      `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                      Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function reset_nsx_credentials_sample(string $formattedPrivateCloud): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $request = (new ResetNsxCredentialsRequest())
        ->setPrivateCloud($formattedPrivateCloud);

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

        if ($response->operationSucceeded()) {
            /** @var PrivateCloud $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
{
    $formattedPrivateCloud = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    reset_nsx_credentials_sample($formattedPrivateCloud);
}

resetVcenterCredentials

Resets credentials of the Vcenter appliance.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::resetVcenterCredentialsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;
use Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedPrivateCloud The resource name of the private cloud
 *                                      to reset credentials for.
 *                                      Resource names are schemeless URIs that follow the conventions in
 *                                      https://cloud.google.com/apis/design/resource_names.
 *                                      For example:
 *                                      `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                      Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function reset_vcenter_credentials_sample(string $formattedPrivateCloud): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $request = (new ResetVcenterCredentialsRequest())
        ->setPrivateCloud($formattedPrivateCloud);

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

        if ($response->operationSucceeded()) {
            /** @var PrivateCloud $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
{
    $formattedPrivateCloud = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    reset_vcenter_credentials_sample($formattedPrivateCloud);
}

revokeDnsBindPermission

Revokes the bind permission from the customer provided principal(user / service account) on the intranet VPC associated with the consumer project.

DnsBindPermission is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::revokeDnsBindPermissionAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\RevokeDnsBindPermissionRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DnsBindPermission;
use Google\Cloud\VmwareEngine\V1\Principal;
use Google\Cloud\VmwareEngine\V1\RevokeDnsBindPermissionRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the resource which stores the users/service accounts
 *                              having the permission to bind to the corresponding intranet VPC of the
 *                              consumer project. DnsBindPermission is a global resource. Resource names
 *                              are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names. For example:
 *                              `projects/my-project/locations/global/dnsBindPermission`
 *                              Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field.
 */
function revoke_dns_bind_permission_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $principal = new Principal();
    $request = (new RevokeDnsBindPermissionRequest())
        ->setName($formattedName)
        ->setPrincipal($principal);

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

        if ($response->operationSucceeded()) {
            /** @var DnsBindPermission $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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]');

    revoke_dns_bind_permission_sample($formattedName);
}

showNsxCredentials

Gets details of credentials for NSX appliance.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::showNsxCredentialsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest

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\VmwareEngine\V1\Credentials
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\Credentials;
use Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest;

/**
 * @param string $formattedPrivateCloud The resource name of the private cloud
 *                                      to be queried for credentials.
 *                                      Resource names are schemeless URIs that follow the conventions in
 *                                      https://cloud.google.com/apis/design/resource_names.
 *                                      For example:
 *                                      `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                      Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function show_nsx_credentials_sample(string $formattedPrivateCloud): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $request = (new ShowNsxCredentialsRequest())
        ->setPrivateCloud($formattedPrivateCloud);

    // Call the API and handle any network failures.
    try {
        /** @var Credentials $response */
        $response = $vmwareEngineClient->showNsxCredentials($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
{
    $formattedPrivateCloud = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    show_nsx_credentials_sample($formattedPrivateCloud);
}

showVcenterCredentials

Gets details of credentials for Vcenter appliance.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::showVcenterCredentialsAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest

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\VmwareEngine\V1\Credentials
Example
use Google\ApiCore\ApiException;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\Credentials;
use Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest;

/**
 * @param string $formattedPrivateCloud The resource name of the private cloud
 *                                      to be queried for credentials.
 *                                      Resource names are schemeless URIs that follow the conventions in
 *                                      https://cloud.google.com/apis/design/resource_names.
 *                                      For example:
 *                                      `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                                      Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function show_vcenter_credentials_sample(string $formattedPrivateCloud): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $request = (new ShowVcenterCredentialsRequest())
        ->setPrivateCloud($formattedPrivateCloud);

    // Call the API and handle any network failures.
    try {
        /** @var Credentials $response */
        $response = $vmwareEngineClient->showVcenterCredentials($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
{
    $formattedPrivateCloud = VmwareEngineClient::privateCloudName(
        '[PROJECT]',
        '[LOCATION]',
        '[PRIVATE_CLOUD]'
    );

    show_vcenter_credentials_sample($formattedPrivateCloud);
}

undeletePrivateCloud

Restores a private cloud that was previously scheduled for deletion by DeletePrivateCloud. A PrivateCloud resource scheduled for deletion has PrivateCloud.state set to DELETED and PrivateCloud.expireTime set to the time when deletion can no longer be reversed.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::undeletePrivateCloudAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;
use Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The resource name of the private cloud scheduled for deletion.
 *                              Resource names are schemeless URIs that follow the conventions in
 *                              https://cloud.google.com/apis/design/resource_names.
 *                              For example:
 *                              `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
 *                              Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field.
 */
function undelete_private_cloud_sample(string $formattedName): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

        if ($response->operationSucceeded()) {
            /** @var PrivateCloud $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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]');

    undelete_private_cloud_sample($formattedName);
}

updateCluster

Modifies a Cluster resource. Only fields specified in updateMask are applied.

During operation processing, the resource is temporarily in the ACTIVE state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateClusterAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateClusterRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\Cluster;
use Google\Cloud\VmwareEngine\V1\UpdateClusterRequest;
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_cluster_sample(): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $clusterNodeTypeConfigs = [];
    $cluster = (new Cluster())
        ->setNodeTypeConfigs($clusterNodeTypeConfigs);
    $request = (new UpdateClusterRequest())
        ->setUpdateMask($updateMask)
        ->setCluster($cluster);

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

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

updateDnsForwarding

Updates the parameters of the DnsForwarding config, like associated domains. Only fields specified in update_mask are applied.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateDnsForwardingAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateDnsForwardingRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\DnsForwarding;
use Google\Cloud\VmwareEngine\V1\DnsForwarding\ForwardingRule;
use Google\Cloud\VmwareEngine\V1\UpdateDnsForwardingRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $dnsForwardingForwardingRulesDomain             Domain used to resolve a `name_servers` list.
 * @param string $dnsForwardingForwardingRulesNameServersElement List of DNS servers to use for domain resolution
 */
function update_dns_forwarding_sample(
    string $dnsForwardingForwardingRulesDomain,
    string $dnsForwardingForwardingRulesNameServersElement
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $dnsForwardingForwardingRulesNameServers = [$dnsForwardingForwardingRulesNameServersElement,];
    $forwardingRule = (new ForwardingRule())
        ->setDomain($dnsForwardingForwardingRulesDomain)
        ->setNameServers($dnsForwardingForwardingRulesNameServers);
    $dnsForwardingForwardingRules = [$forwardingRule,];
    $dnsForwarding = (new DnsForwarding())
        ->setForwardingRules($dnsForwardingForwardingRules);
    $updateMask = new FieldMask();
    $request = (new UpdateDnsForwardingRequest())
        ->setDnsForwarding($dnsForwarding)
        ->setUpdateMask($updateMask);

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

        if ($response->operationSucceeded()) {
            /** @var DnsForwarding $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
{
    $dnsForwardingForwardingRulesDomain = '[DOMAIN]';
    $dnsForwardingForwardingRulesNameServersElement = '[NAME_SERVERS]';

    update_dns_forwarding_sample(
        $dnsForwardingForwardingRulesDomain,
        $dnsForwardingForwardingRulesNameServersElement
    );
}

updateExternalAccessRule

Updates the parameters of a single external access rule.

Only fields specified in update_mask are applied.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateExternalAccessRuleAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateExternalAccessRuleRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ExternalAccessRule;
use Google\Cloud\VmwareEngine\V1\UpdateExternalAccessRuleRequest;
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_external_access_rule_sample(): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $externalAccessRule = new ExternalAccessRule();
    $request = (new UpdateExternalAccessRuleRequest())
        ->setUpdateMask($updateMask)
        ->setExternalAccessRule($externalAccessRule);

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

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

updateExternalAddress

Updates the parameters of a single external IP address.

Only fields specified in update_mask are applied.

During operation processing, the resource is temporarily in the ACTIVE state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateExternalAddressAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateExternalAddressRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ExternalAddress;
use Google\Cloud\VmwareEngine\V1\UpdateExternalAddressRequest;
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_external_address_sample(): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $externalAddress = new ExternalAddress();
    $request = (new UpdateExternalAddressRequest())
        ->setUpdateMask($updateMask)
        ->setExternalAddress($externalAddress);

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

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

updateLoggingServer

Updates the parameters of a single logging server.

Only fields specified in update_mask are applied.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateLoggingServerAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateLoggingServerRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\LoggingServer;
use Google\Cloud\VmwareEngine\V1\LoggingServer\Protocol;
use Google\Cloud\VmwareEngine\V1\LoggingServer\SourceType;
use Google\Cloud\VmwareEngine\V1\UpdateLoggingServerRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $loggingServerHostname   Fully-qualified domain name (FQDN) or IP Address of the logging
 *                                        server.
 * @param int    $loggingServerPort       Port number at which the logging server receives logs.
 * @param int    $loggingServerProtocol   Protocol used by vCenter to send logs to a logging server.
 * @param int    $loggingServerSourceType The type of component that produces logs that will be forwarded
 *                                        to this logging server.
 */
function update_logging_server_sample(
    string $loggingServerHostname,
    int $loggingServerPort,
    int $loggingServerProtocol,
    int $loggingServerSourceType
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $loggingServer = (new LoggingServer())
        ->setHostname($loggingServerHostname)
        ->setPort($loggingServerPort)
        ->setProtocol($loggingServerProtocol)
        ->setSourceType($loggingServerSourceType);
    $request = (new UpdateLoggingServerRequest())
        ->setUpdateMask($updateMask)
        ->setLoggingServer($loggingServer);

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

        if ($response->operationSucceeded()) {
            /** @var LoggingServer $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
{
    $loggingServerHostname = '[HOSTNAME]';
    $loggingServerPort = 0;
    $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED;
    $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED;

    update_logging_server_sample(
        $loggingServerHostname,
        $loggingServerPort,
        $loggingServerProtocol,
        $loggingServerSourceType
    );
}

updateManagementDnsZoneBinding

Updates a ManagementDnsZoneBinding resource.

Only fields specified in update_mask are applied.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateManagementDnsZoneBindingAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateManagementDnsZoneBindingRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding;
use Google\Cloud\VmwareEngine\V1\UpdateManagementDnsZoneBindingRequest;
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_management_dns_zone_binding_sample(): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $managementDnsZoneBinding = new ManagementDnsZoneBinding();
    $request = (new UpdateManagementDnsZoneBindingRequest())
        ->setUpdateMask($updateMask)
        ->setManagementDnsZoneBinding($managementDnsZoneBinding);

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

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

updateNetworkPeering

Modifies a NetworkPeering resource. Only the description field can be updated. Only fields specified in updateMask are applied. NetworkPeering is a global resource and location can only be global.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateNetworkPeeringAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateNetworkPeeringRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\NetworkPeering;
use Google\Cloud\VmwareEngine\V1\NetworkPeering\PeerNetworkType;
use Google\Cloud\VmwareEngine\V1\UpdateNetworkPeeringRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $networkPeeringPeerNetwork                  The relative resource name of the network to peer with
 *                                                           a standard VMware Engine network. The provided network can be a
 *                                                           consumer VPC network or another standard VMware Engine network. If the
 *                                                           `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
 *                                                           `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
 *                                                           Otherwise specify the name in the form:
 *                                                           `projects/{project}/global/networks/{network_id}`, where
 *                                                           `{project}` can either be a project number or a project ID.
 * @param int    $networkPeeringPeerNetworkType              The type of the network to peer with the VMware Engine network.
 * @param string $formattedNetworkPeeringVmwareEngineNetwork The relative resource name of the VMware Engine network.
 *                                                           Specify the name in the following form:
 *                                                           `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
 *                                                           where `{project}` can either be a project number or a project ID. Please see
 *                                                           {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field.
 */
function update_network_peering_sample(
    string $networkPeeringPeerNetwork,
    int $networkPeeringPeerNetworkType,
    string $formattedNetworkPeeringVmwareEngineNetwork
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $networkPeering = (new NetworkPeering())
        ->setPeerNetwork($networkPeeringPeerNetwork)
        ->setPeerNetworkType($networkPeeringPeerNetworkType)
        ->setVmwareEngineNetwork($formattedNetworkPeeringVmwareEngineNetwork);
    $updateMask = new FieldMask();
    $request = (new UpdateNetworkPeeringRequest())
        ->setNetworkPeering($networkPeering)
        ->setUpdateMask($updateMask);

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

        if ($response->operationSucceeded()) {
            /** @var NetworkPeering $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
{
    $networkPeeringPeerNetwork = '[PEER_NETWORK]';
    $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED;
    $formattedNetworkPeeringVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName(
        '[PROJECT]',
        '[LOCATION]',
        '[VMWARE_ENGINE_NETWORK]'
    );

    update_network_peering_sample(
        $networkPeeringPeerNetwork,
        $networkPeeringPeerNetworkType,
        $formattedNetworkPeeringVmwareEngineNetwork
    );
}

updateNetworkPolicy

Modifies a NetworkPolicy resource. Only the following fields can be updated: internet_access, external_ip, edge_services_cidr.

Only fields specified in updateMask are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a NetworkService cannot be updated when NetworkService.state is set to RECONCILING.

During operation processing, the resource is temporarily in the ACTIVE state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateNetworkPolicyAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\NetworkPolicy;
use Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $networkPolicyEdgeServicesCidr IP address range in CIDR notation used to create internet access
 *                                              and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
 *                                              required. The range cannot overlap with any prefixes either in the consumer
 *                                              VPC network or in use by the private clouds attached to that VPC network.
 */
function update_network_policy_sample(string $networkPolicyEdgeServicesCidr): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $networkPolicy = (new NetworkPolicy())
        ->setEdgeServicesCidr($networkPolicyEdgeServicesCidr);
    $updateMask = new FieldMask();
    $request = (new UpdateNetworkPolicyRequest())
        ->setNetworkPolicy($networkPolicy)
        ->setUpdateMask($updateMask);

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

        if ($response->operationSucceeded()) {
            /** @var NetworkPolicy $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
{
    $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]';

    update_network_policy_sample($networkPolicyEdgeServicesCidr);
}

updatePrivateCloud

Modifies a PrivateCloud resource. Only the following fields can be updated: description.

Only fields specified in updateMask are applied.

During operation processing, the resource is temporarily in the ACTIVE state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updatePrivateCloudAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\NetworkConfig;
use Google\Cloud\VmwareEngine\V1\PrivateCloud;
use Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster;
use Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $privateCloudNetworkConfigManagementCidr Management CIDR used by VMware management appliances.
 * @param string $privateCloudManagementClusterClusterId  The user-provided identifier of the new `Cluster`.
 *                                                        The identifier must meet the following requirements:
 *
 *                                                        * Only contains 1-63 alphanumeric characters and hyphens
 *                                                        * Begins with an alphabetical character
 *                                                        * Ends with a non-hyphen character
 *                                                        * Not formatted as a UUID
 *                                                        * Complies with [RFC
 *                                                        1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
 */
function update_private_cloud_sample(
    string $privateCloudNetworkConfigManagementCidr,
    string $privateCloudManagementClusterClusterId
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $privateCloudNetworkConfig = (new NetworkConfig())
        ->setManagementCidr($privateCloudNetworkConfigManagementCidr);
    $privateCloudManagementClusterNodeTypeConfigs = [];
    $privateCloudManagementCluster = (new ManagementCluster())
        ->setClusterId($privateCloudManagementClusterClusterId)
        ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs);
    $privateCloud = (new PrivateCloud())
        ->setNetworkConfig($privateCloudNetworkConfig)
        ->setManagementCluster($privateCloudManagementCluster);
    $updateMask = new FieldMask();
    $request = (new UpdatePrivateCloudRequest())
        ->setPrivateCloud($privateCloud)
        ->setUpdateMask($updateMask);

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

        if ($response->operationSucceeded()) {
            /** @var PrivateCloud $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
{
    $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]';
    $privateCloudManagementClusterClusterId = '[CLUSTER_ID]';

    update_private_cloud_sample(
        $privateCloudNetworkConfigManagementCidr,
        $privateCloudManagementClusterClusterId
    );
}

updatePrivateConnection

Modifies a PrivateConnection resource. Only description and routing_mode fields can be updated. Only fields specified in updateMask are applied.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updatePrivateConnectionAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdatePrivateConnectionRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\PrivateConnection;
use Google\Cloud\VmwareEngine\V1\PrivateConnection\Type;
use Google\Cloud\VmwareEngine\V1\UpdatePrivateConnectionRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $formattedPrivateConnectionVmwareEngineNetwork The relative resource name of Legacy VMware Engine network.
 *                                                              Specify the name in the following form:
 *                                                              `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
 *                                                              where `{project}`, `{location}` will be same as specified in private
 *                                                              connection resource name and `{vmware_engine_network_id}` will be in the
 *                                                              form of `{location}`-default e.g.
 *                                                              projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. Please see
 *                                                              {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field.
 * @param int    $privateConnectionType                         Private connection type.
 * @param string $formattedPrivateConnectionServiceNetwork      Service network to create private connection.
 *                                                              Specify the name in the following form:
 *                                                              `projects/{project}/global/networks/{network_id}`
 *                                                              For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
 *                                                              VPC, e.g. projects/project-tp/global/networks/servicenetworking.
 *                                                              For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
 *                                                              e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
 *                                                              For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
 *                                                              projects/project-tp/global/networks/dell-tenant-vpc.
 *                                                              For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
 *                                                              any other producer VPC to which the VMware Engine Network needs to be
 *                                                              connected, e.g. projects/project/global/networks/vpc. Please see
 *                                                              {@see VmwareEngineClient::networkName()} for help formatting this field.
 */
function update_private_connection_sample(
    string $formattedPrivateConnectionVmwareEngineNetwork,
    int $privateConnectionType,
    string $formattedPrivateConnectionServiceNetwork
): void {
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $privateConnection = (new PrivateConnection())
        ->setVmwareEngineNetwork($formattedPrivateConnectionVmwareEngineNetwork)
        ->setType($privateConnectionType)
        ->setServiceNetwork($formattedPrivateConnectionServiceNetwork);
    $updateMask = new FieldMask();
    $request = (new UpdatePrivateConnectionRequest())
        ->setPrivateConnection($privateConnection)
        ->setUpdateMask($updateMask);

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

        if ($response->operationSucceeded()) {
            /** @var PrivateConnection $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
{
    $formattedPrivateConnectionVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName(
        '[PROJECT]',
        '[LOCATION]',
        '[VMWARE_ENGINE_NETWORK]'
    );
    $privateConnectionType = Type::TYPE_UNSPECIFIED;
    $formattedPrivateConnectionServiceNetwork = VmwareEngineClient::networkName(
        '[PROJECT]',
        '[NETWORK]'
    );

    update_private_connection_sample(
        $formattedPrivateConnectionVmwareEngineNetwork,
        $privateConnectionType,
        $formattedPrivateConnectionServiceNetwork
    );
}

updateSubnet

Updates the parameters of a single subnet. Only fields specified in update_mask are applied.

Note: This API is synchronous and always returns a successful google.longrunning.Operation (LRO). The returned LRO will only have done and response fields.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateSubnetAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateSubnetRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\Subnet;
use Google\Cloud\VmwareEngine\V1\UpdateSubnetRequest;
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_subnet_sample(): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $subnet = new Subnet();
    $request = (new UpdateSubnetRequest())
        ->setUpdateMask($updateMask)
        ->setSubnet($subnet);

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

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

updateVmwareEngineNetwork

Modifies a VMware Engine network resource. Only the following fields can be updated: description. Only fields specified in updateMask are applied.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::updateVmwareEngineNetworkAsync() .

Parameters
Name Description
request Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest

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\VmwareEngine\V1\Client\VmwareEngineClient;
use Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest;
use Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork;
use Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param int $vmwareEngineNetworkType VMware Engine network type.
 */
function update_vmware_engine_network_sample(int $vmwareEngineNetworkType): void
{
    // Create a client.
    $vmwareEngineClient = new VmwareEngineClient();

    // Prepare the request message.
    $vmwareEngineNetwork = (new VmwareEngineNetwork())
        ->setType($vmwareEngineNetworkType);
    $updateMask = new FieldMask();
    $request = (new UpdateVmwareEngineNetworkRequest())
        ->setVmwareEngineNetwork($vmwareEngineNetwork)
        ->setUpdateMask($updateMask);

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

        if ($response->operationSucceeded()) {
            /** @var VmwareEngineNetwork $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
{
    $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED;

    update_vmware_engine_network_sample($vmwareEngineNetworkType);
}

getLocation

Gets information about a location.

The async variant is Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient::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\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;

/**
 * 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.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var Location $response */
        $response = $vmwareEngineClient->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\VmwareEngine\V1\Client\VmwareEngineClient::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\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;

/**
 * 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.
    $vmwareEngineClient = new VmwareEngineClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $vmwareEngineClient->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\VmwareEngine\V1\Client\VmwareEngineClient::getIamPolicyAsync() .

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

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;

/**
 * @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.
    $vmwareEngineClient = new VmwareEngineClient();

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

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

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

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Iam\V1\Policy
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;

/**
 * @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.
    $vmwareEngineClient = new VmwareEngineClient();

    // 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 = $vmwareEngineClient->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\VmwareEngine\V1\Client\VmwareEngineClient::testIamPermissionsAsync() .

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

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

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

Returns
Type Description
Google\Cloud\Iam\V1\TestIamPermissionsResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsResponse;
use Google\Cloud\VmwareEngine\V1\Client\VmwareEngineClient;

/**
 * @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.
    $vmwareEngineClient = new VmwareEngineClient();

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

createClusterAsync

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

createExternalAccessRuleAsync

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

createExternalAddressAsync

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

createHcxActivationKeyAsync

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

createLoggingServerAsync

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

createManagementDnsZoneBindingAsync

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

createNetworkPeeringAsync

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

createNetworkPolicyAsync

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

createPrivateCloudAsync

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

createPrivateConnectionAsync

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

createVmwareEngineNetworkAsync

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

deleteClusterAsync

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

deleteExternalAccessRuleAsync

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

deleteExternalAddressAsync

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

deleteLoggingServerAsync

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

deleteManagementDnsZoneBindingAsync

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

deleteNetworkPeeringAsync

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

deleteNetworkPolicyAsync

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

deletePrivateCloudAsync

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

deletePrivateConnectionAsync

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

deleteVmwareEngineNetworkAsync

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

fetchNetworkPolicyExternalAddressesAsync

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

getClusterAsync

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

getDnsBindPermissionAsync

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

getDnsForwardingAsync

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

getExternalAccessRuleAsync

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

getExternalAddressAsync

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

getHcxActivationKeyAsync

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

getLoggingServerAsync

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

getManagementDnsZoneBindingAsync

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

getNetworkPeeringAsync

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

getNetworkPolicyAsync

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

getNodeAsync

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

getNodeTypeAsync

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

getPrivateCloudAsync

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

getPrivateConnectionAsync

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

getSubnetAsync

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

getVmwareEngineNetworkAsync

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

grantDnsBindPermissionAsync

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

listClustersAsync

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

listExternalAccessRulesAsync

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

listExternalAddressesAsync

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

listHcxActivationKeysAsync

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

listLoggingServersAsync

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

listManagementDnsZoneBindingsAsync

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

listNetworkPeeringsAsync

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

listNetworkPoliciesAsync

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

listNodeTypesAsync

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

listNodesAsync

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

listPeeringRoutesAsync

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

listPrivateCloudsAsync

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

listPrivateConnectionPeeringRoutesAsync

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

listPrivateConnectionsAsync

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

listSubnetsAsync

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

listVmwareEngineNetworksAsync

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

repairManagementDnsZoneBindingAsync

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

resetNsxCredentialsAsync

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

resetVcenterCredentialsAsync

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

revokeDnsBindPermissionAsync

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

showNsxCredentialsAsync

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

showVcenterCredentialsAsync

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

undeletePrivateCloudAsync

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

updateClusterAsync

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

updateDnsForwardingAsync

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

updateExternalAccessRuleAsync

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

updateExternalAddressAsync

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

updateLoggingServerAsync

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

updateManagementDnsZoneBindingAsync

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

updateNetworkPeeringAsync

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

updateNetworkPolicyAsync

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

updatePrivateCloudAsync

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

updatePrivateConnectionAsync

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

updateSubnetAsync

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

updateVmwareEngineNetworkAsync

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

getLocationAsync

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

listLocationsAsync

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

getIamPolicyAsync

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

setIamPolicyAsync

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

testIamPermissionsAsync

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

getOperationsClient

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

Returns
Type Description
Google\ApiCore\LongRunning\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::clusterName

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

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

static::dnsBindPermissionName

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

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

static::dnsForwardingName

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

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

static::externalAccessRuleName

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

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

static::externalAddressName

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

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

static::hcxActivationKeyName

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

Parameters
Name Description
project string
location string
privateCloud string
hcxActivationKey string
Returns
Type Description
string The formatted hcx_activation_key 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::loggingServerName

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

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

static::managementDnsZoneBindingName

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

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

static::networkName

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

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

static::networkPeeringName

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

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

static::networkPolicyName

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

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

static::nodeName

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

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

static::nodeTypeName

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

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

static::privateCloudName

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

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

static::privateConnectionName

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

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

static::subnetName

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

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

static::vmwareEngineNetworkName

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

Parameters
Name Description
project string
location string
vmwareEngineNetwork string
Returns
Type Description
string The formatted vmware_engine_network 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

  • cluster: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}
  • dnsBindPermission: projects/{project}/locations/{location}/dnsBindPermission
  • dnsForwarding: projects/{project}/locations/{location}/privateClouds/{private_cloud}/dnsForwarding
  • externalAccessRule: projects/{project}/locations/{location}/networkPolicies/{network_policy}/externalAccessRules/{external_access_rule}
  • externalAddress: projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}
  • hcxActivationKey: projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key}
  • location: projects/{project}/locations/{location}
  • loggingServer: projects/{project}/locations/{location}/privateClouds/{private_cloud}/loggingServers/{logging_server}
  • managementDnsZoneBinding: projects/{project}/locations/{location}/privateClouds/{private_cloud}/managementDnsZoneBindings/{management_dns_zone_binding}
  • network: projects/{project}/global/networks/{network}
  • networkPeering: projects/{project}/locations/{location}/networkPeerings/{network_peering}
  • networkPolicy: projects/{project}/locations/{location}/networkPolicies/{network_policy}
  • node: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}
  • nodeType: projects/{project}/locations/{location}/nodeTypes/{node_type}
  • privateCloud: projects/{project}/locations/{location}/privateClouds/{private_cloud}
  • privateConnection: projects/{project}/locations/{location}/privateConnections/{private_connection}
  • subnet: projects/{project}/locations/{location}/privateClouds/{private_cloud}/subnets/{subnet}
  • vmwareEngineNetwork: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network}

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.