Class: Google::Apis::ComputeAlpha::CacheInvalidationRule
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::CacheInvalidationRule
- 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
-
#backend_service ⇒ String
If set, this invalidation rule will only apply to requests routed to the given backend service or backend bucket.
-
#cache_tags ⇒ Array<String>
A list of cache tags used to identify cached objects.
-
#content_type ⇒ String
If set, this invalidation rule will only apply to responses with the given content-type.
-
#host ⇒ String
If set, this invalidation rule will only apply to requests with a Host header matching host.
-
#http_status ⇒ Fixnum
If set, this invalidation rule will only apply to responses with the given HTTP status.
-
#path ⇒ String
Corresponds to the JSON property
path.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CacheInvalidationRule
constructor
A new instance of CacheInvalidationRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CacheInvalidationRule
Returns a new instance of CacheInvalidationRule.
7858 7859 7860 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7858 def initialize(**args) update!(**args) end |
Instance Attribute Details
#backend_service ⇒ String
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
7819 7820 7821 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7819 def backend_service @backend_service end |
#cache_tags ⇒ Array<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-Tagresponse 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
ANDwith any tags. Up to 10 tags can be specified in a single invalidation request. Corresponds to the JSON propertycacheTags
7832 7833 7834 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7832 def @cache_tags end |
#content_type ⇒ String
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
7839 7840 7841 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7839 def content_type @content_type end |
#host ⇒ String
If set, this invalidation rule will only apply to requests with a Host
header matching host.
Corresponds to the JSON property host
7845 7846 7847 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7845 def host @host end |
#http_status ⇒ Fixnum
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
7851 7852 7853 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7851 def http_status @http_status end |
#path ⇒ String
Corresponds to the JSON property path
7856 7857 7858 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7856 def path @path end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7863 7864 7865 7866 7867 7868 7869 7870 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 7863 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 |