# Stackdriver Logging V2 Client - Class CreateExclusionRequest (2.1.0)

2.1.0 (latest) 2.0.0 1.34.5 1.33.0 1.32.3 1.31.3 1.30.3 1.29.0 1.28.5 1.27.1 1.26.0 1.25.5 1.24.10 Reference documentation and code samples for the Stackdriver Logging V2 Client class CreateExclusionRequest.

The parameters to `CreateExclusion`.

Generated from protobuf message `google.logging.v2.CreateExclusionRequest`

## Namespace

Google \\ Cloud \\ Logging \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent resource in which to create the exclusion: "projects/\[PROJECT_ID\]" "organizations/\[ORGANIZATION_ID\]" "billingAccounts/\[BILLING_ACCOUNT_ID\]" "folders/\[FOLDER_ID\]" For examples: `"projects/my-logging-project"` `"organizations/123456789"` |
| `↳ exclusion` | `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.LogExclusion` Required. The new exclusion, whose `name` parameter is an exclusion name that is not already used in the parent resource. |

### getParent

Required. The parent resource in which to create the exclusion:
"projects/\[PROJECT_ID\]"
"organizations/\[ORGANIZATION_ID\]"
"billingAccounts/\[BILLING_ACCOUNT_ID\]"
"folders/\[FOLDER_ID\]"
For examples:
`"projects/my-logging-project"`
`"organizations/123456789"`

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

### setParent

Required. The parent resource in which to create the exclusion:
"projects/\[PROJECT_ID\]"
"organizations/\[ORGANIZATION_ID\]"
"billingAccounts/\[BILLING_ACCOUNT_ID\]"
"folders/\[FOLDER_ID\]"
For examples:
`"projects/my-logging-project"`
`"organizations/123456789"`

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

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

### getExclusion

Required. The new exclusion, whose `name` parameter is an exclusion name
that is not already used in the parent resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.LogExclusion|null` |   |

### hasExclusion

### clearExclusion

### setExclusion

Required. The new exclusion, whose `name` parameter is an exclusion name
that is not already used in the parent resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.LogExclusion` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent resource in which to create the exclusion: "projects/\[PROJECT_ID\]" "organizations/\[ORGANIZATION_ID\]" "billingAccounts/\[BILLING_ACCOUNT_ID\]" "folders/\[FOLDER_ID\]" For examples: `"projects/my-logging-project"` `"organizations/123456789"` Please see ConfigServiceV2Client::projectName() for help formatting this field. |
| `exclusion` | `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.LogExclusion` Required. The new exclusion, whose `name` parameter is an exclusion name that is not already used in the parent resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.CreateExclusionRequest` |   |