# Google Anthos Multi Cloud V1 Client - Class AttachedClustersClient (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.2 1.0.0 0.6.1 0.5.4 0.4.4 0.3.0 0.2.3 0.1.4 Reference documentation and code samples for the Google Anthos Multi Cloud V1 Client class AttachedClustersClient.

Service Description: The AttachedClusters API provides a single centrally managed service
to register and manage Anthos attached clusters that run on customer's owned
infrastructure.

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array|https://docs.cloud.google.com/php/docs/reference/gax/latest/Options.ClientOptions.html` 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` | `https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html|https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html` This option should only be used with a pre-constructed [Google\\Auth\\FetchAuthTokenInterface](https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html) or [Google\\ApiCore\\CredentialsWrapper](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html) object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. **Important** : If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly `use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Cloud\GkeMultiCloud\V1\AttachedClustersClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new AttachedClustersClient(['credentials' => $creds]);` <https://cloud.google.com/docs/authentication/external/externally-sourced-credentials> |
| `↳ credentialsConfig` | `array` Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see [Google\\ApiCore\\CredentialsWrapper::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html#_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|https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html` 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](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html) 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()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.GrpcTransport.html#_Google_ApiCore_Transport_GrpcTransport__build__) and [Google\\ApiCore\\Transport\\RestTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.RestTransport.html#_Google_ApiCore_Transport_RestTransport__build__) methods for the supported options. |
| `↳ clientCertSource` | `callable` A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
| `↳ logger` | `false|Psr\Log\LoggerInterface` A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
| `↳ universeDomain` | `string` The service domain for the client. Defaults to 'googleapis.com'. |

### createAttachedCluster

Creates a new
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) resource
on a given Google Cloud Platform project and region.

If successful, the response contains a newly created
Operation resource that can be
described to track the status of the operation.

The async variant is [AttachedClustersClient::createAttachedClusterAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__createAttachedClusterAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.CreateAttachedClusterRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\GkeMultiCloud\V1\AttachedCluster;
    use Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\CreateAttachedClusterRequest;
    use Google\Cloud\GkeMultiCloud\V1\Fleet;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                The parent location where this
     *                                               [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *                                               will be created.
     *
     *                                               Location names are formatted as `projects/<project-id>/locations/<region>`.
     *
     *                                               See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                                               for more details on Google Cloud resource names. Please see
     *                                               {@see AttachedClustersClient::locationName()} for help formatting this field.
     * @param string $attachedClusterPlatformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`).
     *
     *                                               You can list all supported versions on a given Google Cloud region by
     *                                               calling
     *                                               [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig].
     * @param string $attachedClusterDistribution    The Kubernetes distribution of the underlying attached cluster.
     *
     *                                               Supported values: ["eks", "aks", "generic"].
     * @param string $attachedClusterFleetProject    The name of the Fleet host project where this cluster will be
     *                                               registered.
     *
     *                                               Project names are formatted as
     *                                               `projects/<project-number>`.
     * @param string $attachedClusterId              A client provided ID the resource. Must be unique within the
     *                                               parent resource.
     *
     *                                               The provided ID will be part of the
     *                                               [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *                                               name formatted as
     *                                               `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     *
     *                                               Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
     */
    function create_attached_cluster_sample(
        string $formattedParent,
        string $attachedClusterPlatformVersion,
        string $attachedClusterDistribution,
        string $attachedClusterFleetProject,
        string $attachedClusterId
    ): void {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

        // Prepare the request message.
        $attachedClusterOidcConfig = new AttachedOidcConfig();
        $attachedClusterFleet = (new Fleet())
            ->setProject($attachedClusterFleetProject);
        $attachedCluster = (new AttachedCluster())
            ->setOidcConfig($attachedClusterOidcConfig)
            ->setPlatformVersion($attachedClusterPlatformVersion)
            ->setDistribution($attachedClusterDistribution)
            ->setFleet($attachedClusterFleet);
        $request = (new CreateAttachedClusterRequest())
            ->setParent($formattedParent)
            ->setAttachedCluster($attachedCluster)
            ->setAttachedClusterId($attachedClusterId);

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

            if ($response->operationSucceeded()) {
                /** @var AttachedCluster $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 = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]');
        $attachedClusterPlatformVersion = '[PLATFORM_VERSION]';
        $attachedClusterDistribution = '[DISTRIBUTION]';
        $attachedClusterFleetProject = '[PROJECT]';
        $attachedClusterId = '[ATTACHED_CLUSTER_ID]';

        create_attached_cluster_sample(
            $formattedParent,
            $attachedClusterPlatformVersion,
            $attachedClusterDistribution,
            $attachedClusterFleetProject,
            $attachedClusterId
        );
    }

### deleteAttachedCluster

Deletes a specific
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) resource.

If successful, the response contains a newly created
Operation resource that can be
described to track the status of the operation.

The async variant is [AttachedClustersClient::deleteAttachedClusterAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__deleteAttachedClusterAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.DeleteAttachedClusterRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<null>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The resource name the
     *                              [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
     *
     *                              `AttachedCluster` names are formatted as
     *                              `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     *
     *                              See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                              for more details on Google Cloud Platform resource names. Please see
     *                              {@see AttachedClustersClient::attachedClusterName()} for help formatting this field.
     */
    function delete_attached_cluster_sample(string $formattedName): void
    {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $attachedClustersClient->deleteAttachedCluster($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 = AttachedClustersClient::attachedClusterName(
            '[PROJECT]',
            '[LOCATION]',
            '[ATTACHED_CLUSTER]'
        );

        delete_attached_cluster_sample($formattedName);
    }

### generateAttachedClusterAgentToken

Generates an access token for a cluster agent.

The async variant is
[AttachedClustersClient::generateAttachedClusterAgentTokenAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__generateAttachedClusterAgentTokenAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterAgentTokenRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterAgentTokenResponse` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenRequest;
    use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse;

    /**
     * @param string $formattedAttachedCluster Please see
     *                                         {@see AttachedClustersClient::attachedClusterName()} for help formatting this field.
     * @param string $subjectToken             Required.
     * @param string $subjectTokenType         Required.
     * @param string $version                  Required.
     */
    function generate_attached_cluster_agent_token_sample(
        string $formattedAttachedCluster,
        string $subjectToken,
        string $subjectTokenType,
        string $version
    ): void {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

        // Prepare the request message.
        $request = (new GenerateAttachedClusterAgentTokenRequest())
            ->setAttachedCluster($formattedAttachedCluster)
            ->setSubjectToken($subjectToken)
            ->setSubjectTokenType($subjectTokenType)
            ->setVersion($version);

        // Call the API and handle any network failures.
        try {
            /** @var GenerateAttachedClusterAgentTokenResponse $response */
            $response = $attachedClustersClient->generateAttachedClusterAgentToken($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
    {
        $formattedAttachedCluster = AttachedClustersClient::attachedClusterName(
            '[PROJECT]',
            '[LOCATION]',
            '[ATTACHED_CLUSTER]'
        );
        $subjectToken = '[SUBJECT_TOKEN]';
        $subjectTokenType = '[SUBJECT_TOKEN_TYPE]';
        $version = '[VERSION]';

        generate_attached_cluster_agent_token_sample(
            $formattedAttachedCluster,
            $subjectToken,
            $subjectTokenType,
            $version
        );
    }

### generateAttachedClusterInstallManifest

Generates the install manifest to be installed on the target cluster.

The async variant is
[AttachedClustersClient::generateAttachedClusterInstallManifestAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__generateAttachedClusterInstallManifestAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterInstallManifestRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterInstallManifestResponse` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest;
    use Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse;

    /**
     * @param string $formattedParent   The parent location where this
     *                                  [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *                                  will be created.
     *
     *                                  Location names are formatted as `projects/<project-id>/locations/<region>`.
     *
     *                                  See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                                  for more details on Google Cloud resource names. Please see
     *                                  {@see AttachedClustersClient::locationName()} for help formatting this field.
     * @param string $attachedClusterId A client provided ID of the resource. Must be unique within the
     *                                  parent resource.
     *
     *                                  The provided ID will be part of the
     *                                  [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *                                  name formatted as
     *                                  `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     *
     *                                  Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
     *
     *                                  When generating an install manifest for importing an existing Membership
     *                                  resource, the attached_cluster_id field must be the Membership id.
     *
     *                                  Membership names are formatted as
     *                                  `projects/<project-id>/locations/<region>/memberships/<membership-id>`.
     * @param string $platformVersion   The platform version for the cluster (e.g. `1.19.0-gke.1000`).
     *
     *                                  You can list all supported versions on a given Google Cloud region by
     *                                  calling
     *                                  [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig].
     */
    function generate_attached_cluster_install_manifest_sample(
        string $formattedParent,
        string $attachedClusterId,
        string $platformVersion
    ): void {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

        // Prepare the request message.
        $request = (new GenerateAttachedClusterInstallManifestRequest())
            ->setParent($formattedParent)
            ->setAttachedClusterId($attachedClusterId)
            ->setPlatformVersion($platformVersion);

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

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

        generate_attached_cluster_install_manifest_sample(
            $formattedParent,
            $attachedClusterId,
            $platformVersion
        );
    }

### getAttachedCluster

Describes a specific
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) resource.

The async variant is [AttachedClustersClient::getAttachedClusterAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__getAttachedClusterAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GetAttachedClusterRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GkeMultiCloud\V1\AttachedCluster;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest;

    /**
     * @param string $formattedName The name of the
     *                              [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *                              to describe.
     *
     *                              `AttachedCluster` names are formatted as
     *                              `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
     *
     *                              See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                              for more details on Google Cloud Platform resource names. Please see
     *                              {@see AttachedClustersClient::attachedClusterName()} for help formatting this field.
     */
    function get_attached_cluster_sample(string $formattedName): void
    {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var AttachedCluster $response */
            $response = $attachedClustersClient->getAttachedCluster($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 = AttachedClustersClient::attachedClusterName(
            '[PROJECT]',
            '[LOCATION]',
            '[ATTACHED_CLUSTER]'
        );

        get_attached_cluster_sample($formattedName);
    }

### getAttachedServerConfig

Returns information, such as supported Kubernetes versions, on a given
Google Cloud location.

The async variant is
[AttachedClustersClient::getAttachedServerConfigAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__getAttachedServerConfigAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GetAttachedServerConfigRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedServerConfig` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\GetAttachedServerConfigRequest;

    /**
     * @param string $formattedName The name of the
     *                              [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig]
     *                              resource to describe.
     *
     *                              `AttachedServerConfig` names are formatted as
     *                              `projects/<project-id>/locations/<region>/attachedServerConfig`.
     *
     *                              See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                              for more details on Google Cloud resource names. Please see
     *                              {@see AttachedClustersClient::attachedServerConfigName()} for help formatting this field.
     */
    function get_attached_server_config_sample(string $formattedName): void
    {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var AttachedServerConfig $response */
            $response = $attachedClustersClient->getAttachedServerConfig($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 = AttachedClustersClient::attachedServerConfigName('[PROJECT]', '[LOCATION]');

        get_attached_server_config_sample($formattedName);
    }

### importAttachedCluster

Imports creates a new
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) resource
by importing an existing Fleet Membership resource.

Attached Clusters created before the introduction of the Anthos Multi-Cloud
API can be imported through this method.

If successful, the response contains a newly created
Operation resource that can be
described to track the status of the operation.

The async variant is [AttachedClustersClient::importAttachedClusterAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__importAttachedClusterAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.ImportAttachedClusterRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\GkeMultiCloud\V1\AttachedCluster;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\ImportAttachedClusterRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The parent location where this
     *                                [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
     *                                will be created.
     *
     *                                Location names are formatted as `projects/<project-id>/locations/<region>`.
     *
     *                                See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                                for more details on Google Cloud resource names. Please see
     *                                {@see AttachedClustersClient::locationName()} for help formatting this field.
     * @param string $fleetMembership The name of the fleet membership resource to import.
     * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`).
     *
     *                                You can list all supported versions on a given Google Cloud region by
     *                                calling
     *                                [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig].
     * @param string $distribution    The Kubernetes distribution of the underlying attached cluster.
     *
     *                                Supported values: ["eks", "aks", "generic"].
     */
    function import_attached_cluster_sample(
        string $formattedParent,
        string $fleetMembership,
        string $platformVersion,
        string $distribution
    ): void {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

        // Prepare the request message.
        $request = (new ImportAttachedClusterRequest())
            ->setParent($formattedParent)
            ->setFleetMembership($fleetMembership)
            ->setPlatformVersion($platformVersion)
            ->setDistribution($distribution);

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

            if ($response->operationSucceeded()) {
                /** @var AttachedCluster $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 = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]');
        $fleetMembership = '[FLEET_MEMBERSHIP]';
        $platformVersion = '[PLATFORM_VERSION]';
        $distribution = '[DISTRIBUTION]';

        import_attached_cluster_sample($formattedParent, $fleetMembership, $platformVersion, $distribution);
    }

### listAttachedClusters

Lists all [AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster)
resources on a given Google Cloud project and region.

The async variant is [AttachedClustersClient::listAttachedClustersAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__listAttachedClustersAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.ListAttachedClustersRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\GkeMultiCloud\V1\AttachedCluster;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersRequest;

    /**
     * @param string $formattedParent The parent location which owns this collection of
     *                                [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources.
     *
     *                                Location names are formatted as `projects/<project-id>/locations/<region>`.
     *
     *                                See [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *                                for more details on Google Cloud Platform resource names. Please see
     *                                {@see AttachedClustersClient::locationName()} for help formatting this field.
     */
    function list_attached_clusters_sample(string $formattedParent): void
    {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

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

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

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

        list_attached_clusters_sample($formattedParent);
    }

### updateAttachedCluster

Updates an
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster).

The async variant is [AttachedClustersClient::updateAttachedClusterAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.Client.AttachedClustersClient#_Google_Cloud_GkeMultiCloud_V1_Client_AttachedClustersClient__updateAttachedClusterAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.UpdateAttachedClusterRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\GkeMultiCloud\V1\AttachedCluster;
    use Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig;
    use Google\Cloud\GkeMultiCloud\V1\Client\AttachedClustersClient;
    use Google\Cloud\GkeMultiCloud\V1\Fleet;
    use Google\Cloud\GkeMultiCloud\V1\UpdateAttachedClusterRequest;
    use Google\Protobuf\FieldMask;
    use Google\Rpc\Status;

    /**
     * @param string $attachedClusterPlatformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`).
     *
     *                                               You can list all supported versions on a given Google Cloud region by
     *                                               calling
     *                                               [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig].
     * @param string $attachedClusterDistribution    The Kubernetes distribution of the underlying attached cluster.
     *
     *                                               Supported values: ["eks", "aks", "generic"].
     * @param string $attachedClusterFleetProject    The name of the Fleet host project where this cluster will be
     *                                               registered.
     *
     *                                               Project names are formatted as
     *                                               `projects/<project-number>`.
     */
    function update_attached_cluster_sample(
        string $attachedClusterPlatformVersion,
        string $attachedClusterDistribution,
        string $attachedClusterFleetProject
    ): void {
        // Create a client.
        $attachedClustersClient = new AttachedClustersClient();

        // Prepare the request message.
        $attachedClusterOidcConfig = new AttachedOidcConfig();
        $attachedClusterFleet = (new Fleet())
            ->setProject($attachedClusterFleetProject);
        $attachedCluster = (new AttachedCluster())
            ->setOidcConfig($attachedClusterOidcConfig)
            ->setPlatformVersion($attachedClusterPlatformVersion)
            ->setDistribution($attachedClusterDistribution)
            ->setFleet($attachedClusterFleet);
        $updateMask = new FieldMask();
        $request = (new UpdateAttachedClusterRequest())
            ->setAttachedCluster($attachedCluster)
            ->setUpdateMask($updateMask);

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

            if ($response->operationSucceeded()) {
                /** @var AttachedCluster $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
    {
        $attachedClusterPlatformVersion = '[PLATFORM_VERSION]';
        $attachedClusterDistribution = '[DISTRIBUTION]';
        $attachedClusterFleetProject = '[PROJECT]';

        update_attached_cluster_sample(
            $attachedClusterPlatformVersion,
            $attachedClusterDistribution,
            $attachedClusterFleetProject
        );
    }

### createAttachedClusterAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.CreateAttachedClusterRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### deleteAttachedClusterAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.DeleteAttachedClusterRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### generateAttachedClusterAgentTokenAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterAgentTokenRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterAgentTokenResponse>` |   |

### generateAttachedClusterInstallManifestAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterInstallManifestRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GenerateAttachedClusterInstallManifestResponse>` |   |

### getAttachedClusterAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GetAttachedClusterRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster>` |   |

### getAttachedServerConfigAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.GetAttachedServerConfigRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedServerConfig>` |   |

### importAttachedClusterAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.ImportAttachedClusterRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### listAttachedClustersAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.ListAttachedClustersRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### updateAttachedClusterAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.UpdateAttachedClusterRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### 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** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html` |   |

### static::attachedClusterName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `attachedCluster` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted attached_cluster resource. |

### static::attachedServerConfigName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted attached_server_config 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::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

- attachedCluster: projects/{project}/locations/{location}/attachedClusters/{attached_cluster}
- attachedServerConfig: projects/{project}/locations/{location}/attachedServerConfig
- location: projects/{project}/locations/{location}

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