Class: Google::Apis::ComputeAlpha::InstancesSetSecurityPolicyRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstancesSetSecurityPolicyRequest

Returns a new instance of InstancesSetSecurityPolicyRequest.



20349
20350
20351
# File 'lib/google/apis/compute_alpha/classes.rb', line 20349

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

Instance Attribute Details

#network_interfacesArray<String>

The network interfaces that the security policy will be applied to. Network interfaces use the nicN naming format. You can only set a security policy for network interfaces with an access config. Corresponds to the JSON property networkInterfaces

Returns:

  • (Array<String>)


20341
20342
20343
# File 'lib/google/apis/compute_alpha/classes.rb', line 20341

def network_interfaces
  @network_interfaces
end

#security_policyString

A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy. Corresponds to the JSON property securityPolicy

Returns:

  • (String)


20347
20348
20349
# File 'lib/google/apis/compute_alpha/classes.rb', line 20347

def security_policy
  @security_policy
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



20354
20355
20356
20357
# File 'lib/google/apis/compute_alpha/classes.rb', line 20354

def update!(**args)
  @network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces)
  @security_policy = args[:security_policy] if args.key?(:security_policy)
end