# Google Cloud Run V2 Client - Class BinaryAuthorization (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class BinaryAuthorization.

Settings for Binary Authorization feature.

Generated from protobuf message `google.cloud.run.v2.BinaryAuthorization`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ use_default` | `bool` Optional. If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled. |
| `↳ policy` | `string` Optional. The path to a binary authorization policy. Format: `projects/{project}/platforms/cloudRun/{policy-name}` |
| `↳ breakglass_justification` | `string` Optional. If present, indicates to use Breakglass using this justification. If use_default is False, then it must be empty. For more information on breakglass, see <https://cloud.google.com/binary-authorization/docs/using-breakglass> |

### getUseDefault

Optional. If True, indicates to use the default project's binary
authorization policy. If False, binary authorization will be disabled.

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

### hasUseDefault

### setUseDefault

Optional. If True, indicates to use the default project's binary
authorization policy. If False, binary authorization will be disabled.

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

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

### getPolicy

Optional. The path to a binary authorization policy.

Format: `projects/{project}/platforms/cloudRun/{policy-name}`

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

### hasPolicy

### setPolicy

Optional. The path to a binary authorization policy.

Format: `projects/{project}/platforms/cloudRun/{policy-name}`

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

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

### getBreakglassJustification

Optional. If present, indicates to use Breakglass using this justification.

If use_default is False, then it must be empty.
For more information on breakglass, see
<https://cloud.google.com/binary-authorization/docs/using-breakglass>

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

### setBreakglassJustification

Optional. If present, indicates to use Breakglass using this justification.

If use_default is False, then it must be empty.
For more information on breakglass, see
<https://cloud.google.com/binary-authorization/docs/using-breakglass>

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

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

### getBinauthzMethod

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