com.amazonaws.services.s3.model

## クラス BucketWebsiteConfiguration

- java.lang.Object
- - com.amazonaws.services.s3.model.BucketWebsiteConfiguration

-     public class BucketWebsiteConfiguration
      extends java.lang.Object

  Bucket configuration options for hosting static websites entirely out of Amazon S3.

  To host a static website in Amazon S3, create a bucket, upload your files, and set the bucket website configuration. Once your bucket has been configured as a website, you can access all your content via the Amazon S3 website endpoint. To ensure that the existing Amazon S3 REST API will continue to behave the same, regardless of whether or not your bucket has been configured to host a website, a new HTTP endpoint has been introduced where you can access your website content. The bucket content you want to make available via the website must be publicly readable.

  To enable hosting websites, Amazon S3 introduces the following concepts/features:

  - Website endpoints - When you configure a bucket as a website, the website is available via the the region-specific website endpoint where the bucket resides.
  - Index document support - When configuring a bucket as a website you must provide an index document name. This is the webpage that Amazon S3 returns when it receives a request to the root of your website, or one of its subdirectories. Amazon S3 supports index documents in subdirectories.
  - Error document support - Should an error occur, Amazon S3 will return an HTML error document, instead of an XML document.You can optionally provide your own error document that contains HTML, or any other static content specific to your website. You provide the error document name when you configure a bucket as a website. If you provide the custom error document, Amazon S3 returns your custom error document when an HTTP 4XX class error occurs. For other error non-4XX class errors, Amazon S3 will return its own error document.

  For more information on how to host a website on Amazon S3, see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/WebsiteHosting.html.

  関連項目:
    `AmazonS3#setBucketWebsiteConfiguration(String, BucketWebsiteConfiguration)`, `AmazonS3#getBucketWebsiteConfiguration(String)`, `AmazonS3#deleteBucketWebsiteConfiguration(String)`

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `BucketWebsiteConfiguration()` Creates a new BucketWebsiteConfiguration.
    `BucketWebsiteConfiguration(java.lang.String indexDocumentSuffix)` Creates a new BucketWebsiteConfiguration with the specified index document suffix.
    `BucketWebsiteConfiguration(java.lang.String indexDocumentSuffix, java.lang.String errorDocument)` Creates a new BucketWebsiteConfiguration with the specified index document suffix and error document.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.lang.String` | `getErrorDocument()` Returns the complete path to the document to serve for 4xx errors, or null if no error document has been configured.
    `java.lang.String` | `getIndexDocumentSuffix()` Returns the document to serve when a directory is specified (ex: index.html).
    `RedirectRule` | `getRedirectAllRequestsTo()` Return the redirect information where all requests will be redirect to.
    `java.util.List<RoutingRule>` | `getRoutingRules()` Return the list of routing rules that can be used for configuring redirects if certain conditions are meet.
    `void` | `setErrorDocument(java.lang.String errorDocument)` Sets the complete path to the document to serve for 4xx errors.
    `void` | `setIndexDocumentSuffix(java.lang.String indexDocumentSuffix)` Sets the document to serve when a directory is specified (ex: index.html).
    `void` | `setRedirectAllRequestsTo(RedirectRule redirectAllRequestsTo)` Sets the redirect information where all requests will be redirect to.
    `void` | `setRoutingRules(java.util.List<RoutingRule> routingRules)` Set the list of routing rules that can be used for configuring redirects if certain conditions are meet.
    `BucketWebsiteConfiguration` | `withRedirectAllRequestsTo(RedirectRule redirectAllRequestsTo)` Sets the redirect information where all requests will be redirect to and returns a reference to this object(BucketWebsiteConfiguration) for method chaining.
    `BucketWebsiteConfiguration` | `withRoutingRules(java.util.List<RoutingRule> routingRules)` Set the list of routing rules that can be used for configuring redirects if certain conditions are meet and returns a reference to this object(BucketWebsiteConfiguration) for method chaining.

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### BucketWebsiteConfiguration

          public BucketWebsiteConfiguration()

      Creates a new BucketWebsiteConfiguration.

    - #### BucketWebsiteConfiguration

          public BucketWebsiteConfiguration(java.lang.String indexDocumentSuffix)

      Creates a new BucketWebsiteConfiguration with the specified index document suffix.
      パラメータ:
        `indexDocumentSuffix` - The document to serve when a directory is specified (ex: index.html). This path is relative to the requested resource.

    - #### BucketWebsiteConfiguration

          public BucketWebsiteConfiguration(java.lang.String indexDocumentSuffix,
                                    java.lang.String errorDocument)

      Creates a new BucketWebsiteConfiguration with the specified index document suffix and error document.
      パラメータ:
        `indexDocumentSuffix` - The document to serve when a directory is specified (ex: index.html). This path is relative to the requested resource.
        `errorDocument` - The complete path to the document to serve for 4xx errors.

  - ### メソッドの詳細

    - #### getIndexDocumentSuffix

          public java.lang.String getIndexDocumentSuffix()

      Returns the document to serve when a directory is specified (ex: index.html). This path is relative to the requested resource.
      戻り値:
        The document to serve when a directory is specified (ex: index.html). This path is relative to the requested resource.

    - #### setIndexDocumentSuffix

          public void setIndexDocumentSuffix(java.lang.String indexDocumentSuffix)

      Sets the document to serve when a directory is specified (ex: index.html). This path is relative to the requested resource.
      パラメータ:
        `indexDocumentSuffix` - The document to serve when a directory is specified (ex: index.html). This path is relative to the requested resource.

    - #### getErrorDocument

          public java.lang.String getErrorDocument()

      Returns the complete path to the document to serve for 4xx errors, or null if no error document has been configured.
      戻り値:
        The complete path to the document to serve for 4xx errors, or null if no error document has been configured.

    - #### setErrorDocument

          public void setErrorDocument(java.lang.String errorDocument)

      Sets the complete path to the document to serve for 4xx errors.
      パラメータ:
        `errorDocument` - The complete path to the document to serve for 4xx errors.

    - #### setRedirectAllRequestsTo

          public void setRedirectAllRequestsTo(RedirectRule redirectAllRequestsTo)

      Sets the redirect information where all requests will be redirect to.
      パラメータ:
        `redirectAllRequestsTo` - The Redirect information where all requests will be redirect to.

    - #### getRedirectAllRequestsTo

          public RedirectRule getRedirectAllRequestsTo()

      Return the redirect information where all requests will be redirect to.

    - #### withRedirectAllRequestsTo

          public BucketWebsiteConfiguration withRedirectAllRequestsTo(RedirectRule redirectAllRequestsTo)

      Sets the redirect information where all requests will be redirect to and returns a reference to this object(BucketWebsiteConfiguration) for method chaining.
      パラメータ:
        `redirectAllRequestsTo` - The Redirect information where all requests will be redirect to.
      戻り値:
        a reference to this object(BucketWebsiteConfiguration) for method chaining.

    - #### setRoutingRules

          public void setRoutingRules(java.util.List<RoutingRule> routingRules)

      Set the list of routing rules that can be used for configuring redirects if certain conditions are meet.
      パラメータ:
        `routingRules` - The list of routing rules that can be used for configuring redirects.

    - #### getRoutingRules

          public java.util.List<RoutingRule> getRoutingRules()

      Return the list of routing rules that can be used for configuring redirects if certain conditions are meet.

    - #### withRoutingRules

          public BucketWebsiteConfiguration withRoutingRules(java.util.List<RoutingRule> routingRules)

      Set the list of routing rules that can be used for configuring redirects if certain conditions are meet and returns a reference to this object(BucketWebsiteConfiguration) for method chaining.
      パラメータ:
        `routingRules` - The list of routing rules that can be used for configuring redirects.
      戻り値:
        A reference to this object(BucketWebsiteConfiguration) for method chaining.