Interface CORSRule.Builder

All Superinterfaces:
Buildable, CopyableBuilder<CORSRule.Builder,CORSRule>, SdkBuilder<CORSRule.Builder,CORSRule>, SdkPojo
Enclosing class:
CORSRule

public static interface CORSRule.Builder extends SdkPojo, CopyableBuilder<CORSRule.Builder,CORSRule>
  • Method Details

    • id

      Unique identifier for the rule. The value cannot be longer than 255 characters.

      Parameters:
      id - Unique identifier for the rule. The value cannot be longer than 255 characters.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedHeaders

      CORSRule.Builder allowedHeaders(Collection<String> allowedHeaders)

      Headers that are specified in the Access-Control-Request-Headers header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.

      Parameters:
      allowedHeaders - Headers that are specified in the Access-Control-Request-Headers header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedHeaders

      CORSRule.Builder allowedHeaders(String... allowedHeaders)

      Headers that are specified in the Access-Control-Request-Headers header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.

      Parameters:
      allowedHeaders - Headers that are specified in the Access-Control-Request-Headers header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedMethods

      CORSRule.Builder allowedMethods(Collection<String> allowedMethods)

      An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.

      Parameters:
      allowedMethods - An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedMethods

      CORSRule.Builder allowedMethods(String... allowedMethods)

      An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.

      Parameters:
      allowedMethods - An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedOrigins

      CORSRule.Builder allowedOrigins(Collection<String> allowedOrigins)

      One or more origins you want customers to be able to access the bucket from.

      Parameters:
      allowedOrigins - One or more origins you want customers to be able to access the bucket from.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedOrigins

      CORSRule.Builder allowedOrigins(String... allowedOrigins)

      One or more origins you want customers to be able to access the bucket from.

      Parameters:
      allowedOrigins - One or more origins you want customers to be able to access the bucket from.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • exposeHeaders

      CORSRule.Builder exposeHeaders(Collection<String> exposeHeaders)

      One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

      Parameters:
      exposeHeaders - One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • exposeHeaders

      CORSRule.Builder exposeHeaders(String... exposeHeaders)

      One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

      Parameters:
      exposeHeaders - One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxAgeSeconds

      CORSRule.Builder maxAgeSeconds(Integer maxAgeSeconds)

      The time in seconds that your browser is to cache the preflight response for the specified resource.

      Parameters:
      maxAgeSeconds - The time in seconds that your browser is to cache the preflight response for the specified resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.