Class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Constraint

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

Overview

The definition of a constraint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAssetV1Constraint

Returns a new instance of GoogleCloudAssetV1Constraint.



1650
1651
1652
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1650

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

Instance Attribute Details

#boolean_constraintGoogle::Apis::CloudassetV1::GoogleCloudAssetV1BooleanConstraint

A Constraint that is either enforced or not. For example a constraint constraints/compute.disableSerialPortAccess. If it is enforced on a VM instance, serial port connections will not be opened to that instance. Corresponds to the JSON property booleanConstraint



1620
1621
1622
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1620

def boolean_constraint
  @boolean_constraint
end

#constraint_defaultString

The evaluation behavior of this constraint in the absence of 'Policy'. Corresponds to the JSON property constraintDefault

Returns:

  • (String)


1625
1626
1627
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1625

def constraint_default
  @constraint_default
end

#descriptionString

Detailed description of what this Constraint controls as well as how and where it is enforced. Corresponds to the JSON property description

Returns:

  • (String)


1631
1632
1633
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1631

def description
  @description
end

#display_nameString

The human readable name of the constraint. Corresponds to the JSON property displayName

Returns:

  • (String)


1636
1637
1638
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1636

def display_name
  @display_name
end

#list_constraintGoogle::Apis::CloudassetV1::GoogleCloudAssetV1ListConstraint

A Constraint that allows or disallows a list of string values, which are configured by an organization's policy administrator with a Policy. Corresponds to the JSON property listConstraint



1642
1643
1644
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1642

def list_constraint
  @list_constraint
end

#nameString

The unique name of the constraint. Format of the name should be * constraints/ constraint_name`For example,constraints/compute.disableSerialPortAccess. Corresponds to the JSON propertyname`

Returns:

  • (String)


1648
1649
1650
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1648

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1655
1656
1657
1658
1659
1660
1661
1662
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1655

def update!(**args)
  @boolean_constraint = args[:boolean_constraint] if args.key?(:boolean_constraint)
  @constraint_default = args[:constraint_default] if args.key?(:constraint_default)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @list_constraint = args[:list_constraint] if args.key?(:list_constraint)
  @name = args[:name] if args.key?(:name)
end