Data Loss Prevention V2 Client - Class CreateContentPolicyRequest (2.15.2)

Reference documentation and code samples for the Data Loss Prevention V2 Client class CreateContentPolicyRequest.

Request message for CreateContentPolicy.

Generated from protobuf message google.privacy.dlp.v2.CreateContentPolicyRequest

Namespace

Google \ Cloud \ Dlp \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ parent string

Required. Parent resource name. The format of this value varies depending on the scope of the request (project): + Projects scope: projects/{project_id}/locations/{location_id}

↳ content_policy ContentPolicy

Required. The content_policy resource.

↳ content_policy_id string

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. If empty, the system will generate a random id.

getParent

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id}
Returns
Type Description
string

setParent

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id}
Parameter
Name Description
var string
Returns
Type Description
$this

getContentPolicy

Required. The content_policy resource.

Returns
Type Description
ContentPolicy|null

hasContentPolicy

clearContentPolicy

setContentPolicy

Required. The content_policy resource.

Parameter
Name Description
var ContentPolicy
Returns
Type Description
$this

getContentPolicyId

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+.

The maximum length is 100 characters. If empty, the system will generate a random id.

Returns
Type Description
string

setContentPolicyId

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+.

The maximum length is 100 characters. If empty, the system will generate a random id.

Parameter
Name Description
var string
Returns
Type Description
$this

static::build

Parameters
Name Description
parent string

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id} Please see DlpServiceClient::locationName() for help formatting this field.
contentPolicy ContentPolicy

Required. The content_policy resource.

Returns
Type Description
CreateContentPolicyRequest