Google Cloud Edge Network V1 Client - Class EdgeNetworkClient (0.3.6)

Reference documentation and code samples for the Google Cloud Edge Network V1 Client class EdgeNetworkClient.

Service Description: EdgeNetwork API provides managed, highly available cloud dynamic network configuration service to the GEC customer to enable edge application and network function solutions. This allows the customers to easily define and configure the network setup and property to meet the workload requirement.

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 \ EdgeNetwork \ 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.

createInterconnectAttachment

Creates a new InterconnectAttachment in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::createInterconnectAttachmentAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\CreateInterconnectAttachmentRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\CreateInterconnectAttachmentRequest;
use Google\Cloud\EdgeNetwork\V1\InterconnectAttachment;
use Google\Rpc\Status;

/**
 * @param string $formattedParent                             Value for parent. Please see
 *                                                            {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 * @param string $interconnectAttachmentId                    Id of the requesting object
 *                                                            If auto-generating Id server-side, remove this field and
 *                                                            interconnect_attachment_id from the method_signature of Create RPC
 * @param string $interconnectAttachmentName                  The canonical resource name of the interconnect attachment.
 * @param string $formattedInterconnectAttachmentInterconnect The canonical name of underlying Interconnect object that this
 *                                                            attachment's traffic will traverse through. The name is in the form of
 *                                                            `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`. Please see
 *                                                            {@see EdgeNetworkClient::interconnectName()} for help formatting this field.
 * @param int    $interconnectAttachmentVlanId                VLAN id provided by user. Must be site-wise unique.
 */
function create_interconnect_attachment_sample(
    string $formattedParent,
    string $interconnectAttachmentId,
    string $interconnectAttachmentName,
    string $formattedInterconnectAttachmentInterconnect,
    int $interconnectAttachmentVlanId
): void {
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

    // Prepare the request message.
    $interconnectAttachment = (new InterconnectAttachment())
        ->setName($interconnectAttachmentName)
        ->setInterconnect($formattedInterconnectAttachmentInterconnect)
        ->setVlanId($interconnectAttachmentVlanId);
    $request = (new CreateInterconnectAttachmentRequest())
        ->setParent($formattedParent)
        ->setInterconnectAttachmentId($interconnectAttachmentId)
        ->setInterconnectAttachment($interconnectAttachment);

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

        if ($response->operationSucceeded()) {
            /** @var InterconnectAttachment $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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');
    $interconnectAttachmentId = '[INTERCONNECT_ATTACHMENT_ID]';
    $interconnectAttachmentName = '[NAME]';
    $formattedInterconnectAttachmentInterconnect = EdgeNetworkClient::interconnectName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[INTERCONNECT]'
    );
    $interconnectAttachmentVlanId = 0;

    create_interconnect_attachment_sample(
        $formattedParent,
        $interconnectAttachmentId,
        $interconnectAttachmentName,
        $formattedInterconnectAttachmentInterconnect,
        $interconnectAttachmentVlanId
    );
}

createNetwork

Creates a new Network in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::createNetworkAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\CreateNetworkRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\CreateNetworkRequest;
use Google\Cloud\EdgeNetwork\V1\Network;
use Google\Rpc\Status;

/**
 * @param string $formattedParent Value for parent. Please see
 *                                {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 * @param string $networkId       Id of the requesting object
 *                                If auto-generating Id server-side, remove this field and
 *                                network_id from the method_signature of Create RPC
 * @param string $networkName     The canonical resource name of the network.
 */
function create_network_sample(
    string $formattedParent,
    string $networkId,
    string $networkName
): void {
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

    // Prepare the request message.
    $network = (new Network())
        ->setName($networkName);
    $request = (new CreateNetworkRequest())
        ->setParent($formattedParent)
        ->setNetworkId($networkId)
        ->setNetwork($network);

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

        if ($response->operationSucceeded()) {
            /** @var Network $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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');
    $networkId = '[NETWORK_ID]';
    $networkName = '[NAME]';

    create_network_sample($formattedParent, $networkId, $networkName);
}

createRouter

Creates a new Router in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::createRouterAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\CreateRouterRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\CreateRouterRequest;
use Google\Cloud\EdgeNetwork\V1\Router;
use Google\Rpc\Status;

/**
 * @param string $formattedParent        Value for parent. Please see
 *                                       {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 * @param string $routerId               Id of the requesting object
 *                                       If auto-generating Id server-side, remove this field and
 *                                       router_id from the method_signature of Create RPC
 * @param string $routerName             The canonical resource name of the router.
 * @param string $formattedRouterNetwork The canonical name of the network to which this router belongs.
 *                                       The name is in the form of
 *                                       `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`. Please see
 *                                       {@see EdgeNetworkClient::networkName()} for help formatting this field.
 */
function create_router_sample(
    string $formattedParent,
    string $routerId,
    string $routerName,
    string $formattedRouterNetwork
): void {
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

    // Prepare the request message.
    $router = (new Router())
        ->setName($routerName)
        ->setNetwork($formattedRouterNetwork);
    $request = (new CreateRouterRequest())
        ->setParent($formattedParent)
        ->setRouterId($routerId)
        ->setRouter($router);

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

        if ($response->operationSucceeded()) {
            /** @var Router $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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');
    $routerId = '[ROUTER_ID]';
    $routerName = '[NAME]';
    $formattedRouterNetwork = EdgeNetworkClient::networkName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[NETWORK]'
    );

    create_router_sample($formattedParent, $routerId, $routerName, $formattedRouterNetwork);
}

createSubnet

Creates a new Subnet in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::createSubnetAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\CreateSubnetRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\CreateSubnetRequest;
use Google\Cloud\EdgeNetwork\V1\Subnet;
use Google\Rpc\Status;

/**
 * @param string $formattedParent        Value for parent. Please see
 *                                       {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 * @param string $subnetId               Id of the requesting object
 *                                       If auto-generating Id server-side, remove this field and
 *                                       subnet_id from the method_signature of Create RPC
 * @param string $subnetName             The canonical resource name of the subnet.
 * @param string $formattedSubnetNetwork The network that this subnetwork belongs to. Please see
 *                                       {@see EdgeNetworkClient::networkName()} for help formatting this field.
 */
function create_subnet_sample(
    string $formattedParent,
    string $subnetId,
    string $subnetName,
    string $formattedSubnetNetwork
): void {
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

    // Prepare the request message.
    $subnet = (new Subnet())
        ->setName($subnetName)
        ->setNetwork($formattedSubnetNetwork);
    $request = (new CreateSubnetRequest())
        ->setParent($formattedParent)
        ->setSubnetId($subnetId)
        ->setSubnet($subnet);

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

/**
 * 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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');
    $subnetId = '[SUBNET_ID]';
    $subnetName = '[NAME]';
    $formattedSubnetNetwork = EdgeNetworkClient::networkName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[NETWORK]'
    );

    create_subnet_sample($formattedParent, $subnetId, $subnetName, $formattedSubnetNetwork);
}

deleteInterconnectAttachment

Deletes a single InterconnectAttachment.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::deleteInterconnectAttachmentAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\DeleteInterconnectAttachmentRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\DeleteInterconnectAttachmentRequest;
use Google\Rpc\Status;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $edgeNetworkClient->deleteInterconnectAttachment($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 = EdgeNetworkClient::interconnectAttachmentName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[INTERCONNECT_ATTACHMENT]'
    );

    delete_interconnect_attachment_sample($formattedName);
}

deleteNetwork

Deletes a single Network.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::deleteNetworkAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\DeleteNetworkRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\DeleteNetworkRequest;
use Google\Rpc\Status;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $edgeNetworkClient->deleteNetwork($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 = EdgeNetworkClient::networkName('[PROJECT]', '[LOCATION]', '[ZONE]', '[NETWORK]');

    delete_network_sample($formattedName);
}

deleteRouter

Deletes a single Router.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::deleteRouterAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\DeleteRouterRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\DeleteRouterRequest;
use Google\Rpc\Status;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $edgeNetworkClient->deleteRouter($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 = EdgeNetworkClient::routerName('[PROJECT]', '[LOCATION]', '[ZONE]', '[ROUTER]');

    delete_router_sample($formattedName);
}

deleteSubnet

Deletes a single Subnet.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::deleteSubnetAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\DeleteSubnetRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\DeleteSubnetRequest;
use Google\Rpc\Status;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $edgeNetworkClient->deleteSubnet($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 = EdgeNetworkClient::subnetName('[PROJECT]', '[LOCATION]', '[ZONE]', '[SUBNET]');

    delete_subnet_sample($formattedName);
}

diagnoseInterconnect

Get the diagnostics of a single interconnect resource.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::diagnoseInterconnectAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\DiagnoseInterconnectRequest

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\EdgeNetwork\V1\DiagnoseInterconnectResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\DiagnoseInterconnectRequest;
use Google\Cloud\EdgeNetwork\V1\DiagnoseInterconnectResponse;

/**
 * @param string $formattedName The name of the interconnect resource. Please see
 *                              {@see EdgeNetworkClient::interconnectName()} for help formatting this field.
 */
function diagnose_interconnect_sample(string $formattedName): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var DiagnoseInterconnectResponse $response */
        $response = $edgeNetworkClient->diagnoseInterconnect($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 = EdgeNetworkClient::interconnectName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[INTERCONNECT]'
    );

    diagnose_interconnect_sample($formattedName);
}

diagnoseNetwork

Get the diagnostics of a single network resource.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::diagnoseNetworkAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\DiagnoseNetworkRequest

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\EdgeNetwork\V1\DiagnoseNetworkResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\DiagnoseNetworkRequest;
use Google\Cloud\EdgeNetwork\V1\DiagnoseNetworkResponse;

/**
 * @param string $formattedName The name of the network resource. Please see
 *                              {@see EdgeNetworkClient::networkName()} for help formatting this field.
 */
function diagnose_network_sample(string $formattedName): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var DiagnoseNetworkResponse $response */
        $response = $edgeNetworkClient->diagnoseNetwork($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 = EdgeNetworkClient::networkName('[PROJECT]', '[LOCATION]', '[ZONE]', '[NETWORK]');

    diagnose_network_sample($formattedName);
}

diagnoseRouter

Get the diagnostics of a single router resource.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::diagnoseRouterAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\DiagnoseRouterRequest

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\EdgeNetwork\V1\DiagnoseRouterResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\DiagnoseRouterRequest;
use Google\Cloud\EdgeNetwork\V1\DiagnoseRouterResponse;

/**
 * @param string $formattedName The name of the router resource. Please see
 *                              {@see EdgeNetworkClient::routerName()} for help formatting this field.
 */
function diagnose_router_sample(string $formattedName): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var DiagnoseRouterResponse $response */
        $response = $edgeNetworkClient->diagnoseRouter($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 = EdgeNetworkClient::routerName('[PROJECT]', '[LOCATION]', '[ZONE]', '[ROUTER]');

    diagnose_router_sample($formattedName);
}

getInterconnect

Gets details of a single Interconnect.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::getInterconnectAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\GetInterconnectRequest

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\EdgeNetwork\V1\Interconnect
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\GetInterconnectRequest;
use Google\Cloud\EdgeNetwork\V1\Interconnect;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var Interconnect $response */
        $response = $edgeNetworkClient->getInterconnect($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 = EdgeNetworkClient::interconnectName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[INTERCONNECT]'
    );

    get_interconnect_sample($formattedName);
}

getInterconnectAttachment

Gets details of a single InterconnectAttachment.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::getInterconnectAttachmentAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\GetInterconnectAttachmentRequest

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\EdgeNetwork\V1\InterconnectAttachment
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\GetInterconnectAttachmentRequest;
use Google\Cloud\EdgeNetwork\V1\InterconnectAttachment;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var InterconnectAttachment $response */
        $response = $edgeNetworkClient->getInterconnectAttachment($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 = EdgeNetworkClient::interconnectAttachmentName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[INTERCONNECT_ATTACHMENT]'
    );

    get_interconnect_attachment_sample($formattedName);
}

getNetwork

Gets details of a single Network.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::getNetworkAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\GetNetworkRequest

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\EdgeNetwork\V1\Network
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\GetNetworkRequest;
use Google\Cloud\EdgeNetwork\V1\Network;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var Network $response */
        $response = $edgeNetworkClient->getNetwork($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 = EdgeNetworkClient::networkName('[PROJECT]', '[LOCATION]', '[ZONE]', '[NETWORK]');

    get_network_sample($formattedName);
}

getRouter

Gets details of a single Router.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::getRouterAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\GetRouterRequest

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\EdgeNetwork\V1\Router
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\GetRouterRequest;
use Google\Cloud\EdgeNetwork\V1\Router;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var Router $response */
        $response = $edgeNetworkClient->getRouter($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 = EdgeNetworkClient::routerName('[PROJECT]', '[LOCATION]', '[ZONE]', '[ROUTER]');

    get_router_sample($formattedName);
}

getSubnet

Gets details of a single Subnet.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::getSubnetAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\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\EdgeNetwork\V1\Subnet
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\GetSubnetRequest;
use Google\Cloud\EdgeNetwork\V1\Subnet;

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

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

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

    get_subnet_sample($formattedName);
}

getZone

Deprecated: not implemented.

Gets details of a single Zone.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::getZoneAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\GetZoneRequest

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\EdgeNetwork\V1\Zone
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\GetZoneRequest;
use Google\Cloud\EdgeNetwork\V1\Zone;

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

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

    // Call the API and handle any network failures.
    try {
        /** @var Zone $response */
        $response = $edgeNetworkClient->getZone($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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');

    get_zone_sample($formattedName);
}

initializeZone

InitializeZone will initialize resources for a zone in a project.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::initializeZoneAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\InitializeZoneRequest

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\EdgeNetwork\V1\InitializeZoneResponse
Example
use Google\ApiCore\ApiException;
use Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\InitializeZoneRequest;
use Google\Cloud\EdgeNetwork\V1\InitializeZoneResponse;

/**
 * @param string $formattedName The name of the zone resource. Please see
 *                              {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 */
function initialize_zone_sample(string $formattedName): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var InitializeZoneResponse $response */
        $response = $edgeNetworkClient->initializeZone($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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');

    initialize_zone_sample($formattedName);
}

listInterconnectAttachments

Lists InterconnectAttachments in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::listInterconnectAttachmentsAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\ListInterconnectAttachmentsRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\InterconnectAttachment;
use Google\Cloud\EdgeNetwork\V1\ListInterconnectAttachmentsRequest;

/**
 * @param string $formattedParent Parent value for ListInterconnectAttachmentsRequest
 *                                Please see {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 */
function list_interconnect_attachments_sample(string $formattedParent): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

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

        /** @var InterconnectAttachment $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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');

    list_interconnect_attachments_sample($formattedParent);
}

listInterconnects

Lists Interconnects in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::listInterconnectsAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\ListInterconnectsRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\Interconnect;
use Google\Cloud\EdgeNetwork\V1\ListInterconnectsRequest;

/**
 * @param string $formattedParent Parent value for ListInterconnectsRequest
 *                                Please see {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 */
function list_interconnects_sample(string $formattedParent): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

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

        /** @var Interconnect $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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');

    list_interconnects_sample($formattedParent);
}

listNetworks

Lists Networks in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::listNetworksAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\ListNetworksRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\ListNetworksRequest;
use Google\Cloud\EdgeNetwork\V1\Network;

/**
 * @param string $formattedParent Parent value for ListNetworksRequest
 *                                Please see {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 */
function list_networks_sample(string $formattedParent): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

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

        /** @var Network $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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');

    list_networks_sample($formattedParent);
}

listRouters

Lists Routers in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::listRoutersAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\ListRoutersRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\ListRoutersRequest;
use Google\Cloud\EdgeNetwork\V1\Router;

/**
 * @param string $formattedParent Parent value for ListRoutersRequest
 *                                Please see {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 */
function list_routers_sample(string $formattedParent): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

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

        /** @var Router $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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');

    list_routers_sample($formattedParent);
}

listSubnets

Lists Subnets in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::listSubnetsAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\ListSubnetsRequest;
use Google\Cloud\EdgeNetwork\V1\Subnet;

/**
 * @param string $formattedParent Parent value for ListSubnetsRequest
 *                                Please see {@see EdgeNetworkClient::zoneName()} for help formatting this field.
 */
function list_subnets_sample(string $formattedParent): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $edgeNetworkClient->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 = EdgeNetworkClient::zoneName('[PROJECT]', '[LOCATION]', '[ZONE]');

    list_subnets_sample($formattedParent);
}

listZones

Deprecated: not implemented.

Lists Zones in a given project and location.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::listZonesAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\ListZonesRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\ListZonesRequest;
use Google\Cloud\EdgeNetwork\V1\Zone;

/**
 * @param string $formattedParent Parent value for ListZonesRequest
 *                                Please see {@see EdgeNetworkClient::locationName()} for help formatting this field.
 */
function list_zones_sample(string $formattedParent): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

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

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

    list_zones_sample($formattedParent);
}

updateRouter

Updates the parameters of a single Router.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::updateRouterAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\V1\UpdateRouterRequest

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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\Router;
use Google\Cloud\EdgeNetwork\V1\UpdateRouterRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $routerName             The canonical resource name of the router.
 * @param string $formattedRouterNetwork The canonical name of the network to which this router belongs.
 *                                       The name is in the form of
 *                                       `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`. Please see
 *                                       {@see EdgeNetworkClient::networkName()} for help formatting this field.
 */
function update_router_sample(string $routerName, string $formattedRouterNetwork): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

    // Prepare the request message.
    $updateMask = new FieldMask();
    $router = (new Router())
        ->setName($routerName)
        ->setNetwork($formattedRouterNetwork);
    $request = (new UpdateRouterRequest())
        ->setUpdateMask($updateMask)
        ->setRouter($router);

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

        if ($response->operationSucceeded()) {
            /** @var Router $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
{
    $routerName = '[NAME]';
    $formattedRouterNetwork = EdgeNetworkClient::networkName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[NETWORK]'
    );

    update_router_sample($routerName, $formattedRouterNetwork);
}

updateSubnet

Updates the parameters of a single Subnet.

The async variant is Google\Cloud\EdgeNetwork\V1\Client\EdgeNetworkClient::updateSubnetAsync() .

Parameters
Name Description
request Google\Cloud\EdgeNetwork\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\EdgeNetwork\V1\Client\EdgeNetworkClient;
use Google\Cloud\EdgeNetwork\V1\Subnet;
use Google\Cloud\EdgeNetwork\V1\UpdateSubnetRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;

/**
 * @param string $subnetName             The canonical resource name of the subnet.
 * @param string $formattedSubnetNetwork The network that this subnetwork belongs to. Please see
 *                                       {@see EdgeNetworkClient::networkName()} for help formatting this field.
 */
function update_subnet_sample(string $subnetName, string $formattedSubnetNetwork): void
{
    // Create a client.
    $edgeNetworkClient = new EdgeNetworkClient();

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

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

/**
 * 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
{
    $subnetName = '[NAME]';
    $formattedSubnetNetwork = EdgeNetworkClient::networkName(
        '[PROJECT]',
        '[LOCATION]',
        '[ZONE]',
        '[NETWORK]'
    );

    update_subnet_sample($subnetName, $formattedSubnetNetwork);
}

getLocation

Gets information about a location.

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

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

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

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

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

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

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

createInterconnectAttachmentAsync

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

createNetworkAsync

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

createRouterAsync

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

createSubnetAsync

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

deleteInterconnectAttachmentAsync

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

deleteNetworkAsync

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

deleteRouterAsync

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

deleteSubnetAsync

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

diagnoseInterconnectAsync

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

diagnoseNetworkAsync

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

diagnoseRouterAsync

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

getInterconnectAsync

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

getInterconnectAttachmentAsync

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

getNetworkAsync

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

getRouterAsync

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

getSubnetAsync

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

getZoneAsync

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

initializeZoneAsync

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

listInterconnectAttachmentsAsync

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

listInterconnectsAsync

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

listNetworksAsync

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

listRoutersAsync

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

listSubnetsAsync

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

listZonesAsync

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

updateRouterAsync

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

updateSubnetAsync

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

getLocationAsync

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

listLocationsAsync

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

getOperationsClient

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

Returns
Type Description
Google\LongRunning\Client\OperationsClient

resumeOperation

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

Parameters
Name Description
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
Type Description
Google\ApiCore\OperationResponse

static::interconnectName

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

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

static::interconnectAttachmentName

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

Parameters
Name Description
project string
location string
zone string
interconnectAttachment string
Returns
Type Description
string The formatted interconnect_attachment 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::networkName

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

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

static::routerName

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

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

static::subnetName

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

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

static::zoneName

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

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

  • interconnect: projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}
  • interconnectAttachment: projects/{project}/locations/{location}/zones/{zone}/interconnectAttachments/{interconnect_attachment}
  • location: projects/{project}/locations/{location}
  • network: projects/{project}/locations/{location}/zones/{zone}/networks/{network}
  • router: projects/{project}/locations/{location}/zones/{zone}/routers/{router}
  • subnet: projects/{project}/locations/{location}/zones/{zone}/subnets/{subnet}
  • zone: projects/{project}/locations/{location}/zones/{zone}

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.