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.



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

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)


726
727
728
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 726

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)


732
733
734
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 732

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)


738
739
740
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 738

def description
  @description
end

#folder_idFixnum

The folder_id of the violation Corresponds to the JSON property folderId

Returns:

  • (Fixnum)


743
744
745
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 743

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)


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

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)


757
758
759
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 757

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



763
764
765
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 763

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)


769
770
771
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 769

def resolve_time
  @resolve_time
end

#stateString

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

Returns:

  • (String)


774
775
776
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 774

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)


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

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/google/apis/cloudcontrolspartner_v1/classes.rb', line 786

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