0.16.0 (latest) 0.15.0 0.14.0 0.13.3 0.12.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.2 0.5.1 0.4.2 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Memorystore V1 Client class AclRule.

A single ACL rule which defines the policy for a user.

Generated from protobuf message `google.cloud.memorystore.v1.AclRule`

## Namespace

Google \\ Cloud \\ Memorystore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ username` | `string` Required. Specifies the IAM user or service account to be added to the ACL policy. This username will be directly set on the Valkey OSS. |
| `↳ rule` | `string` Required. The rule to be applied to the username. Ex: "on \>password123 \~\* +@all" The format of the rule is defined by Valkey OSS: <https://valkey.io/topics/acl/> |

### getUsername

Required. Specifies the IAM user or service account to be added to the ACL
policy. This username will be directly set on the Valkey OSS.

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

### setUsername

Required. Specifies the IAM user or service account to be added to the ACL
policy. This username will be directly set on the Valkey OSS.

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

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

### getRule

Required. The rule to be applied to the username. Ex: "on \>password123 \~\*
+@all" The format of the rule is defined by Valkey OSS:
<https://valkey.io/topics/acl/>

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

### setRule

Required. The rule to be applied to the username. Ex: "on \>password123 \~\*
+@all" The format of the rule is defined by Valkey OSS:
<https://valkey.io/topics/acl/>

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

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