Google Cloud Cloud Controls Partner V1beta Client - Class Violation (0.2.2)

Reference documentation and code samples for the Google Cloud Cloud Controls Partner V1beta Client class Violation.

Details of resource Violation

Generated from protobuf message google.cloud.cloudcontrolspartner.v1beta.Violation

Namespace

Google \ Cloud \ CloudControlsPartner \ V1beta

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Identifier. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}

↳ description string

Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value.

↳ begin_time Google\Protobuf\Timestamp

Output only. Time of the event which triggered the Violation.

↳ update_time Google\Protobuf\Timestamp

Output only. The last time when the Violation record was updated.

↳ resolve_time Google\Protobuf\Timestamp

Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.

↳ category string

Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.

↳ state int

Output only. State of the violation

↳ non_compliant_org_policy string

Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}

↳ folder_id int|string

The folder_id of the violation

↳ remediation Violation\Remediation

Output only. Compliance violation remediation

getName

Identifier. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}

Returns
Type Description
string

setName

Identifier. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}

Parameter
Name Description
var string
Returns
Type Description
$this

getDescription

Output only. Description for the Violation.

e.g. OrgPolicy gcp.resourceLocations has non compliant value.

Returns
Type Description
string

setDescription

Output only. Description for the Violation.

e.g. OrgPolicy gcp.resourceLocations has non compliant value.

Parameter
Name Description
var string
Returns
Type Description
$this

getBeginTime

Output only. Time of the event which triggered the Violation.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasBeginTime

clearBeginTime

setBeginTime

Output only. Time of the event which triggered the Violation.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. The last time when the Violation record was updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last time when the Violation record was updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getResolveTime

Output only. Time of the event which fixed the Violation.

If the violation is ACTIVE this will be empty.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasResolveTime

clearResolveTime

setResolveTime

Output only. Time of the event which fixed the Violation.

If the violation is ACTIVE this will be empty.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getCategory

Output only. Category under which this violation is mapped.

e.g. Location, Service Usage, Access, Encryption, etc.

Returns
Type Description
string

setCategory

Output only. Category under which this violation is mapped.

e.g. Location, Service Usage, Access, Encryption, etc.

Parameter
Name Description
var string
Returns
Type Description
$this

getState

Output only. State of the violation

Returns
Type Description
int

setState

Output only. State of the violation

Parameter
Name Description
var int
Returns
Type Description
$this

getNonCompliantOrgPolicy

Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}

Returns
Type Description
string

setNonCompliantOrgPolicy

Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}

Parameter
Name Description
var string
Returns
Type Description
$this

getFolderId

The folder_id of the violation

Returns
Type Description
int|string

setFolderId

The folder_id of the violation

Parameter
Name Description
var int|string
Returns
Type Description
$this

getRemediation

Output only. Compliance violation remediation

Returns
Type Description
Violation\Remediation|null

hasRemediation

clearRemediation

setRemediation

Output only. Compliance violation remediation

Parameter
Name Description
var Violation\Remediation
Returns
Type Description
$this