# Google Anthos Multi Cloud V1 Client - Class CreateAttachedClusterRequest (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 CreateAttachedClusterRequest.

Request message for `AttachedClusters.CreateAttachedCluster` method.

Generated from protobuf message `google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest`

## Namespace

Google \\ Cloud \\ GkeMultiCloud \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent location where this [AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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. |
| `↳ attached_cluster` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster` Required. The specification of the [AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) to create. |
| `↳ attached_cluster_id` | `string` Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the [AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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. |
| `↳ validate_only` | `bool` If set, only validate the request, but do not actually create the cluster. |

### getParent

Required. The parent location where this
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Required. The parent location where this
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAttachedCluster

Required. The specification of the
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) to create.

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

### hasAttachedCluster

### clearAttachedCluster

### setAttachedCluster

Required. The specification of the
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) to create.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAttachedClusterId

Required. A client provided ID the resource. Must be unique within the
parent resource.

The provided ID will be part of the
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setAttachedClusterId

Required. A client provided ID the resource. Must be unique within the
parent resource.

The provided ID will be part of the
[AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getValidateOnly

If set, only validate the request, but do not actually create the cluster.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setValidateOnly

If set, only validate the request, but do not actually create the cluster.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent location where this [AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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 AttachedClustersClient::locationName() for help formatting this field. |
| `attachedCluster` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster` Required. The specification of the [AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/V1.AttachedCluster) to create. |
| `attachedClusterId` | `string` Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the [AttachedCluster](https://docs.cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest/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. |

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