Class: Google::Apis::CloudcontrolspartnerV1::Violation

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

Overview

Details of resource Violation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Violation

Returns a new instance of Violation.



804
805
806
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 804

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

Instance Attribute Details

#begin_timeString

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

Returns:

  • (String)


749
750
751
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 749

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)


755
756
757
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 755

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)


761
762
763
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 761

def description
  @description
end

#folder_idFixnum

The folder_id of the violation Corresponds to the JSON property folderId

Returns:

  • (Fixnum)


766
767
768
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 766

def folder_id
  @folder_id
end

#nameString

Identifier. Format: organizations/organization/locations/location/ customers/customer/workloads/workload/violations/violation` Corresponds to the JSON propertyname`

Returns:

  • (String)


772
773
774
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 772

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 propertynonCompliantOrgPolicy`

Returns:

  • (String)


780
781
782
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 780

def non_compliant_org_policy
  @non_compliant_org_policy
end

#remediationGoogle::Apis::CloudcontrolspartnerV1::Remediation

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



786
787
788
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 786

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)


792
793
794
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 792

def resolve_time
  @resolve_time
end

#stateString

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

Returns:

  • (String)


797
798
799
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 797

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)


802
803
804
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 802

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



809
810
811
812
813
814
815
816
817
818
819
820
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 809

def update!(**args)
  @begin_time = args[:begin_time] if args.key?(:begin_time)
  @category = args[:category] if args.key?(:category)
  @description = args[:description] if args.key?(:description)
  @folder_id = args[:folder_id] if args.key?(:folder_id)
  @name = args[:name] if args.key?(:name)
  @non_compliant_org_policy = args[:non_compliant_org_policy] if args.key?(:non_compliant_org_policy)
  @remediation = args[:remediation] if args.key?(:remediation)
  @resolve_time = args[:resolve_time] if args.key?(:resolve_time)
  @state = args[:state] if args.key?(:state)
  @update_time = args[:update_time] if args.key?(:update_time)
end