1.3.0 (latest) 1.2.4 1.1.3 1.0.4 0.5.5 0.4.5 0.3.5 Reference documentation and code samples for the Access Context Manager V1 Client class EgressPolicy.

Policy for egress from perimeter.

[EgressPolicies](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
match requests based on `egress_from` and `egress_to` stanzas. For an
[EgressPolicy](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
to match, both `egress_from` and `egress_to` stanzas must be matched. If an
[EgressPolicy](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
matches a request, the request is allowed to span the [ServicePerimeter](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeter) boundary.
For example, an [EgressPolicy](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
can be used to allow VMs on networks within the [ServicePerimeter](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeter) to access a
defined set of projects outside the perimeter in certain contexts (e.g. to
read data from a Cloud Storage bucket or query against a BigQuery dataset).
[EgressPolicies](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
are concerned with the *resources* that a request relates as well as the
API services and API actions being used. They do not related to the
direction of data movement. More detailed documentation for this concept
can be found in the descriptions of [EgressFrom](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressFrom)
and [EgressTo](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressTo).

Generated from protobuf message `google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy`

## Namespace

Google \\ Identity \\ AccessContextManager \\ V1 \\ ServicePerimeterConfig

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ egress_from` | `https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressFrom` Defines conditions on the source of a request causing this \[EgressPolicy\] \[google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy\] to apply. |
| `↳ egress_to` | `https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressTo` Defines the conditions on the \[ApiOperation\] \[google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation\] and destination resources that cause this \[EgressPolicy\] \[google.identity.accesscontextmanager.v1.ServicePerimeterConfig.EgressPolicy\] to apply. |

### getEgressFrom

Defines conditions on the source of a request causing this [EgressPolicy](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
to apply.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressFrom|null` |   |

### hasEgressFrom

### clearEgressFrom

### setEgressFrom

Defines conditions on the source of a request causing this [EgressPolicy](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
to apply.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressFrom` |

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

### getEgressTo

Defines the conditions on the [ApiOperation](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.ApiOperation)
and destination resources that cause this [EgressPolicy](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
to apply.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressTo|null` |   |

### hasEgressTo

### clearEgressTo

### setEgressTo

Defines the conditions on the [ApiOperation](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.ApiOperation)
and destination resources that cause this [EgressPolicy](https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressPolicy)
to apply.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.ServicePerimeterConfig.EgressTo` |

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