Class: Google::Apis::ComputeAlpha::CacheInvalidationRule

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) ⇒ CacheInvalidationRule

Returns a new instance of CacheInvalidationRule.



8190
8191
8192
# File 'lib/google/apis/compute_alpha/classes.rb', line 8190

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

Instance Attribute Details

#backend_serviceString

If set, this invalidation rule will only apply to requests routed to the given backend service or backend bucket. For example, for a backend bucket bb1 in the same scope as the URL map, the path would be projects/my-project/global/backendBuckets/bb1; and for a backend service bs1 in the same scope as the URL map, the path would be projects/my-project/global/backendServices/bs1. Corresponds to the JSON property backendService

Returns:

  • (String)


8151
8152
8153
# File 'lib/google/apis/compute_alpha/classes.rb', line 8151

def backend_service
  @backend_service
end

#cache_tagsArray<String>

A list of cache tags used to identify cached objects.

  • Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.
  • Multiple cache tags in the same invalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.
  • If other fields are also specified, these are treated as Boolean AND with any tags. Up to 10 tags can be specified in a single invalidation request. Corresponds to the JSON property cacheTags

Returns:

  • (Array<String>)


8164
8165
8166
# File 'lib/google/apis/compute_alpha/classes.rb', line 8164

def cache_tags
  @cache_tags
end

#content_typeString

If set, this invalidation rule will only apply to responses with the given content-type. Parameters are not allowed and are ignored from the response when matching. Wildcards are not allowed. Corresponds to the JSON property contentType

Returns:

  • (String)


8171
8172
8173
# File 'lib/google/apis/compute_alpha/classes.rb', line 8171

def content_type
  @content_type
end

#hostString

If set, this invalidation rule will only apply to requests with a Host header matching host. Corresponds to the JSON property host

Returns:

  • (String)


8177
8178
8179
# File 'lib/google/apis/compute_alpha/classes.rb', line 8177

def host
  @host
end

#http_statusFixnum

If set, this invalidation rule will only apply to responses with the given HTTP status. Valid range is 200-599. Corresponds to the JSON property httpStatus

Returns:

  • (Fixnum)


8183
8184
8185
# File 'lib/google/apis/compute_alpha/classes.rb', line 8183

def http_status
  @http_status
end

#pathString

Corresponds to the JSON property path

Returns:

  • (String)


8188
8189
8190
# File 'lib/google/apis/compute_alpha/classes.rb', line 8188

def path
  @path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8195
8196
8197
8198
8199
8200
8201
8202
# File 'lib/google/apis/compute_alpha/classes.rb', line 8195

def update!(**args)
  @backend_service = args[:backend_service] if args.key?(:backend_service)
  @cache_tags = args[:cache_tags] if args.key?(:cache_tags)
  @content_type = args[:content_type] if args.key?(:content_type)
  @host = args[:host] if args.key?(:host)
  @http_status = args[:http_status] if args.key?(:http_status)
  @path = args[:path] if args.key?(:path)
end