Class: Google::Apis::StorageV1::Bucket::Website

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

Overview

The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Website

Returns a new instance of Website.



1132
1133
1134
# File 'lib/google/apis/storage_v1/classes.rb', line 1132

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

Instance Attribute Details

#main_page_suffixString

If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. Corresponds to the JSON property mainPageSuffix

Returns:

  • (String)


1123
1124
1125
# File 'lib/google/apis/storage_v1/classes.rb', line 1123

def main_page_suffix
  @main_page_suffix
end

#not_found_pageString

If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. Corresponds to the JSON property notFoundPage

Returns:

  • (String)


1130
1131
1132
# File 'lib/google/apis/storage_v1/classes.rb', line 1130

def not_found_page
  @not_found_page
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1137
1138
1139
1140
# File 'lib/google/apis/storage_v1/classes.rb', line 1137

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