# Google Cloud Sql Admin V1 Client - Class PscConfig (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.6 1.1.0 1.0.0 0.19.0 0.18.0 0.17.1 0.16.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.12 Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class PscConfig.

PSC settings for a Cloud SQL instance.

Generated from protobuf message `google.cloud.sql.v1.PscConfig`

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ psc_enabled` | `bool` Whether PSC connectivity is enabled for this instance. |
| `↳ allowed_consumer_projects` | `string[]` Optional. The list of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric). |
| `↳ psc_auto_connections` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.PscAutoConnectionConfig>` Optional. The list of settings for requested Private Service Connect consumer endpoints that can be used to connect to this Cloud SQL instance. |
| `↳ network_attachment_uri` | `string` Optional. The network attachment of the consumer network that the Private Service Connect enabled Cloud SQL instance is authorized to connect via PSC interface. format: projects/PROJECT/regions/REGION/networkAttachments/ID |
| `↳ psc_auto_dns_enabled` | `bool` Optional. Indicates whether PSC DNS automation is enabled for this instance. When enabled, Cloud SQL provisions a universal DNS record across all networks configured with Private Service Connect (PSC) auto-connections. This will default to true for new instances when Private Service Connect is enabled. |
| `↳ psc_write_endpoint_dns_enabled` | `bool` Optional. Indicates whether PSC write endpoint DNS automation is enabled for this instance. When enabled, Cloud SQL provisions a universal global DNS record across all networks configured with Private Service Connect (PSC) auto-connections that always points to the cluster primary instance. This feature is only supported for Enterprise Plus edition. This will default to true for new Enterprise Plus instances when `psc_auto_dns_enabled` is enabled. |

### getPscEnabled

Whether PSC connectivity is enabled for this instance.

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

### hasPscEnabled

### clearPscEnabled

### setPscEnabled

Whether PSC connectivity is enabled for this instance.

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

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

### getAllowedConsumerProjects

Optional. The list of consumer projects that are allow-listed for PSC
connections to this instance. This instance can be connected to with PSC
from any network in these projects.

Each consumer project in this list may be represented by a project number
(numeric) or by a project id (alphanumeric).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setAllowedConsumerProjects

Optional. The list of consumer projects that are allow-listed for PSC
connections to this instance. This instance can be connected to with PSC
from any network in these projects.

Each consumer project in this list may be represented by a project number
(numeric) or by a project id (alphanumeric).

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

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

### getPscAutoConnections

Optional. The list of settings for requested Private Service Connect
consumer endpoints that can be used to connect to this Cloud SQL instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.PscAutoConnectionConfig>` |   |

### setPscAutoConnections

Optional. The list of settings for requested Private Service Connect
consumer endpoints that can be used to connect to this Cloud SQL instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.PscAutoConnectionConfig>` |

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

### getNetworkAttachmentUri

Optional. The network attachment of the consumer network that the
Private Service Connect enabled Cloud SQL instance is
authorized to connect via PSC interface.

format: projects/PROJECT/regions/REGION/networkAttachments/ID

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

### setNetworkAttachmentUri

Optional. The network attachment of the consumer network that the
Private Service Connect enabled Cloud SQL instance is
authorized to connect via PSC interface.

format: projects/PROJECT/regions/REGION/networkAttachments/ID

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

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

### getPscAutoDnsEnabled

Optional. Indicates whether PSC DNS automation is enabled for this
instance. When enabled, Cloud SQL provisions a universal DNS record across
all networks configured with Private Service Connect (PSC)
auto-connections. This will default to true for new instances when Private
Service Connect is enabled.

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

### hasPscAutoDnsEnabled

### clearPscAutoDnsEnabled

### setPscAutoDnsEnabled

Optional. Indicates whether PSC DNS automation is enabled for this
instance. When enabled, Cloud SQL provisions a universal DNS record across
all networks configured with Private Service Connect (PSC)
auto-connections. This will default to true for new instances when Private
Service Connect is enabled.

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

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

### getPscWriteEndpointDnsEnabled

Optional. Indicates whether PSC write endpoint DNS automation is enabled
for this instance. When enabled, Cloud SQL provisions a universal global
DNS record across all networks configured with Private Service Connect
(PSC) auto-connections that always points to the cluster primary instance.

This feature is only supported for Enterprise Plus edition.
This will default to true for new Enterprise Plus instances when
`psc_auto_dns_enabled` is enabled.

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

### hasPscWriteEndpointDnsEnabled

### clearPscWriteEndpointDnsEnabled

### setPscWriteEndpointDnsEnabled

Optional. Indicates whether PSC write endpoint DNS automation is enabled
for this instance. When enabled, Cloud SQL provisions a universal global
DNS record across all networks configured with Private Service Connect
(PSC) auto-connections that always points to the cluster primary instance.

This feature is only supported for Enterprise Plus edition.
This will default to true for new Enterprise Plus instances when
`psc_auto_dns_enabled` is enabled.

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

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