0.13.0 (latest) 0.12.0 0.11.0 0.10.3 0.9.0 0.8.0 0.7.0 0.6.4 0.5.1 0.4.1 0.3.2 0.2.5 0.1.0 Reference documentation and code samples for the Google Cloud Redis Cluster V1 Client class AclRule.

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

Generated from protobuf message `google.cloud.redis.cluster.v1.AclRule`

## Namespace

Google \\ Cloud \\ Redis \\ Cluster \\ 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 Redis OSS. |
| `↳ rule` | `string` Required. The rule to be applied to the username. Ex: "on \>password123 \~\* +@all" The format of the rule is defined by Redis OSS: <https://redis.io/docs/latest/operate/oss_and_stack/management/security/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 Redis 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 Redis 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 Redis OSS:
<https://redis.io/docs/latest/operate/oss_and_stack/management/security/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 Redis OSS:
<https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/>

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

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