Class: Google::Apis::AssuredworkloadsV1::GoogleCloudAssuredworkloadsV1Violation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/assuredworkloads_v1/classes.rb,
lib/google/apis/assuredworkloads_v1/representations.rb,
lib/google/apis/assuredworkloads_v1/representations.rb

Overview

Workload monitoring Violation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAssuredworkloadsV1Violation

Returns a new instance of GoogleCloudAssuredworkloadsV1Violation.



980
981
982
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 980

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#acknowledgedBoolean Also known as: acknowledged?

A boolean that indicates if the violation is acknowledged Corresponds to the JSON property acknowledged

Returns:

  • (Boolean)


860
861
862
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 860

def acknowledged
  @acknowledged
end

#acknowledgement_timeString

Optional. Timestamp when this violation was acknowledged first. Check exception_contexts to find the last time the violation was acknowledged when there are more than one violations. This field will be absent when acknowledged field is marked as false. Corresponds to the JSON property acknowledgementTime

Returns:

  • (String)


869
870
871
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 869

def acknowledgement_time
  @acknowledgement_time
end

#associated_org_policy_violation_idString

Optional. Output only. Violation Id of the org-policy violation due to which the resource violation is caused. Empty for org-policy violations. Corresponds to the JSON property associatedOrgPolicyViolationId

Returns:

  • (String)


875
876
877
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 875

def associated_org_policy_violation_id
  @associated_org_policy_violation_id
end

Output only. Immutable. Audit Log Link for violated resource Format: https:// console.cloud.google.com/logs/query;query=logNameprotoPayload.resourceName timeRangefolder Corresponds to the JSON property auditLogLink

Returns:

  • (String)


882
883
884
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 882

def audit_log_link
  @audit_log_link
end

#begin_timeString

Output only. Time of the event which triggered the Violation. Corresponds to the JSON property beginTime

Returns:

  • (String)


887
888
889
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 887

def begin_time
  @begin_time
end

#categoryString

Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc. Corresponds to the JSON property category

Returns:

  • (String)


893
894
895
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 893

def category
  @category
end

#descriptionString

Output only. Description for the Violation. e.g. OrgPolicy gcp. resourceLocations has non compliant value. Corresponds to the JSON property description

Returns:

  • (String)


899
900
901
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 899

def description
  @description
end

Output only. Immutable. Audit Log link to find business justification provided for violation exception. Format: https://console.cloud.google.com/logs/query; query=logNameprotoPayload.resourceNameprotoPayload.methodNametimeRange organization Corresponds to the JSON property exceptionAuditLogLink

Returns:

  • (String)


907
908
909
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 907

def exception_audit_log_link
  @exception_audit_log_link
end

#exception_contextsArray<Google::Apis::AssuredworkloadsV1::GoogleCloudAssuredworkloadsV1ViolationExceptionContext>

Output only. List of all the exception detail added for the violation. Corresponds to the JSON property exceptionContexts



912
913
914
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 912

def exception_contexts
  @exception_contexts
end

#nameString

Output only. Immutable. Name of the Violation. Format: organizations/ organization/locations/location/workloads/workload_id/violations/ violations_id Corresponds to the JSON property name

Returns:

  • (String)


919
920
921
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 919

def name
  @name
end

#non_compliant_org_policyString

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 Corresponds to the JSON property nonCompliantOrgPolicy

Returns:

  • (String)


927
928
929
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 927

def non_compliant_org_policy
  @non_compliant_org_policy
end

#org_policy_constraintString

Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation. Corresponds to the JSON property orgPolicyConstraint

Returns:

  • (String)


933
934
935
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 933

def org_policy_constraint
  @org_policy_constraint
end

#parent_project_numberString

Optional. Output only. Parent project number where resource is present. Empty for org-policy violations. Corresponds to the JSON property parentProjectNumber

Returns:

  • (String)


939
940
941
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 939

def parent_project_number
  @parent_project_number
end

#remediationGoogle::Apis::AssuredworkloadsV1::GoogleCloudAssuredworkloadsV1ViolationRemediation

Represents remediation guidance to resolve compliance violation for AssuredWorkload Corresponds to the JSON property remediation



945
946
947
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 945

def remediation
  @remediation
end

#resolve_timeString

Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty. Corresponds to the JSON property resolveTime

Returns:

  • (String)


951
952
953
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 951

def resolve_time
  @resolve_time
end

#resource_nameString

Optional. Output only. Name of the resource like //storage.googleapis.com/ myprojectxyz-testbucket. Empty for org-policy violations. Corresponds to the JSON property resourceName

Returns:

  • (String)


957
958
959
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 957

def resource_name
  @resource_name
end

#resource_typeString

Optional. Output only. Type of the resource like compute.googleapis.com/Disk, etc. Empty for org-policy violations. Corresponds to the JSON property resourceType

Returns:

  • (String)


963
964
965
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 963

def resource_type
  @resource_type
end

#stateString

Output only. State of the violation Corresponds to the JSON property state

Returns:

  • (String)


968
969
970
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 968

def state
  @state
end

#update_timeString

Output only. The last time when the Violation record was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


973
974
975
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 973

def update_time
  @update_time
end

#violation_typeString

Output only. Type of the violation Corresponds to the JSON property violationType

Returns:

  • (String)


978
979
980
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 978

def violation_type
  @violation_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 985

def update!(**args)
  @acknowledged = args[:acknowledged] if args.key?(:acknowledged)
  @acknowledgement_time = args[:acknowledgement_time] if args.key?(:acknowledgement_time)
  @associated_org_policy_violation_id = args[:associated_org_policy_violation_id] if args.key?(:associated_org_policy_violation_id)
  @audit_log_link = args[:audit_log_link] if args.key?(:audit_log_link)
  @begin_time = args[:begin_time] if args.key?(:begin_time)
  @category = args[:category] if args.key?(:category)
  @description = args[:description] if args.key?(:description)
  @exception_audit_log_link = args[:exception_audit_log_link] if args.key?(:exception_audit_log_link)
  @exception_contexts = args[:exception_contexts] if args.key?(:exception_contexts)
  @name = args[:name] if args.key?(:name)
  @non_compliant_org_policy = args[:non_compliant_org_policy] if args.key?(:non_compliant_org_policy)
  @org_policy_constraint = args[:org_policy_constraint] if args.key?(:org_policy_constraint)
  @parent_project_number = args[:parent_project_number] if args.key?(:parent_project_number)
  @remediation = args[:remediation] if args.key?(:remediation)
  @resolve_time = args[:resolve_time] if args.key?(:resolve_time)
  @resource_name = args[:resource_name] if args.key?(:resource_name)
  @resource_type = args[:resource_type] if args.key?(:resource_type)
  @state = args[:state] if args.key?(:state)
  @update_time = args[:update_time] if args.key?(:update_time)
  @violation_type = args[:violation_type] if args.key?(:violation_type)
end