Google Cloud Org Policy V2 Client - Class CreatePolicyRequest (0.4.2)

Reference documentation and code samples for the Google Cloud Org Policy V2 Client class CreatePolicyRequest.

The request sent to the [CreatePolicyRequest] [google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy] method.

Generated from protobuf message google.cloud.orgpolicy.v2.CreatePolicyRequest

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ parent string

Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * projects/{project_number} * projects/{project_id} * folders/{folder_id} * organizations/{organization_id}

↳ policy Google\Cloud\OrgPolicy\V2\Policy

Required. Policy to create.

getParent

Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms:

  • projects/{project_number}
  • projects/{project_id}
  • folders/{folder_id}
  • organizations/{organization_id}
Returns
TypeDescription
string

setParent

Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms:

  • projects/{project_number}
  • projects/{project_id}
  • folders/{folder_id}
  • organizations/{organization_id}
Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPolicy

Required. Policy to create.

Returns
TypeDescription
Google\Cloud\OrgPolicy\V2\Policy|null

hasPolicy

clearPolicy

setPolicy

Required. Policy to create.

Parameter
NameDescription
var Google\Cloud\OrgPolicy\V2\Policy
Returns
TypeDescription
$this