Class: Google::Apis::ComputeAlpha::NetworkPolicy

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

Overview

Represents a Network Policy resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkPolicy

Returns a new instance of NetworkPolicy.



45542
45543
45544
# File 'lib/google/apis/compute_alpha/classes.rb', line 45542

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

Instance Attribute Details

#associationsArray<Google::Apis::ComputeAlpha::NetworkPolicyAssociation>

Output only. [Output Only] A list of associations that belong to this network policy. Corresponds to the JSON property associations



45478
45479
45480
# File 'lib/google/apis/compute_alpha/classes.rb', line 45478

def associations
  @associations
end

#creation_timestampString

Output only. [Output Only] Creation timestamp inRFC3339 text format. Corresponds to the JSON property creationTimestamp

Returns:

  • (String)


45484
45485
45486
# File 'lib/google/apis/compute_alpha/classes.rb', line 45484

def creation_timestamp
  @creation_timestamp
end

#descriptionString

An optional description of this resource. Provide this property when you create the resource. Corresponds to the JSON property description

Returns:

  • (String)


45490
45491
45492
# File 'lib/google/apis/compute_alpha/classes.rb', line 45490

def description
  @description
end

#idFixnum

[Output Only] The unique identifier for the resource. This identifier is defined by the server. Corresponds to the JSON property id

Returns:

  • (Fixnum)


45496
45497
45498
# File 'lib/google/apis/compute_alpha/classes.rb', line 45496

def id
  @id
end

#kindString

Output only. [Output only] Type of the resource. Alwayscompute#networkPolicy for network policies Corresponds to the JSON property kind

Returns:

  • (String)


45502
45503
45504
# File 'lib/google/apis/compute_alpha/classes.rb', line 45502

def kind
  @kind
end

#nameString

Name of the resource. Corresponds to the JSON property name

Returns:

  • (String)


45507
45508
45509
# File 'lib/google/apis/compute_alpha/classes.rb', line 45507

def name
  @name
end

#regionString

Output only. [Output Only] URL of the region where the regional network policy resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. Corresponds to the JSON property region

Returns:

  • (String)


45515
45516
45517
# File 'lib/google/apis/compute_alpha/classes.rb', line 45515

def region
  @region
end

#rule_tuple_countFixnum

Output only. [Output Only] Total count of all network policy rule tuples. A network policy can not exceed a set number of tuples. Corresponds to the JSON property ruleTupleCount

Returns:

  • (Fixnum)


45522
45523
45524
# File 'lib/google/apis/compute_alpha/classes.rb', line 45522

def rule_tuple_count
  @rule_tuple_count
end

Output only. [Output Only] Server-defined URL for the resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


45527
45528
45529
# File 'lib/google/apis/compute_alpha/classes.rb', line 45527

def self_link
  @self_link
end

Output only. [Output Only] Server-defined URL for this resource with the resource id. Corresponds to the JSON property selfLinkWithId

Returns:

  • (String)


45533
45534
45535
# File 'lib/google/apis/compute_alpha/classes.rb', line 45533

def self_link_with_id
  @self_link_with_id
end

#traffic_classification_rulesArray<Google::Apis::ComputeAlpha::NetworkPolicyTrafficClassificationRule>

Output only. [Output Only] A list of traffic classification rules that belong to this policy. Corresponds to the JSON property trafficClassificationRules



45540
45541
45542
# File 'lib/google/apis/compute_alpha/classes.rb', line 45540

def traffic_classification_rules
  @traffic_classification_rules
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
# File 'lib/google/apis/compute_alpha/classes.rb', line 45547

def update!(**args)
  @associations = args[:associations] if args.key?(:associations)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @description = args[:description] if args.key?(:description)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @region = args[:region] if args.key?(:region)
  @rule_tuple_count = args[:rule_tuple_count] if args.key?(:rule_tuple_count)
  @self_link = args[:self_link] if args.key?(:self_link)
  @self_link_with_id = args[:self_link_with_id] if args.key?(:self_link_with_id)
  @traffic_classification_rules = args[:traffic_classification_rules] if args.key?(:traffic_classification_rules)
end