类 CorsConfiguration
- java.lang.Object
-
- com.baidubce.services.bos.model.CorsConfiguration
-
public class CorsConfiguration extends Object
CorsConfiguration for Bucket CORS(Cross-Origin Resource Sharing). Bucket's CORS rule container. Allow up to 100 rules. If there are multiple configurations, the order of execution is from top to bottom. Required Parameters: allowedOrigins. Required Parameters: allowedMethods. Optional Parameters: allowedHeaders. Optional Parameters: allowedExposeHeaders. Optional Parameters: maxAgeSeconds.
-
-
构造器概要
构造器 构造器 说明 CorsConfiguration()The void Constructor of Bucket CORS.CorsConfiguration(List<String> allowedOrigins, List<AllowedMethods> allowedMethods, List<String> allowedHeaders, List<String> allowedExposeHeaders, int maxAgeSeconds)The Constructor of Bucket CORS.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 List<String>getAllowedExposeHeaders()Gets allowedExposeHeaders of Bucket CORS.List<String>getAllowedHeaders()Gets allowedHeaders of Bucket CORS.List<AllowedMethods>getAllowedMethods()Gets allowedMethods of Bucket CORS.List<String>getAllowedOrigins()Gets allowedOrigins of Bucket CORS.intgetMaxAgeSeconds()Gets maxAgeSeconds of Bucket CORS.voidsetAllowedExposeHeaders(List<String> allowedExposeHeaders)Sets allowedExposeHeaders of Bucket CORS.voidsetAllowedHeaders(List<String> allowedHeaders)Sets allowedHeaders of Bucket CORS.voidsetAllowedMethods(List<AllowedMethods> allowedMethods)Sets allowedMethods of Bucket CORS.voidsetAllowedOrigins(List<String> allowedOrigins)Sets allowedOrigins of Bucket CORS.voidsetMaxAgeSeconds(int maxAgeSeconds)Sets maxAgeSeconds of Bucket CORS.StringtoString()CorsConfigurationwithAllowedExposeHeaders(List<String> allowedExposeHeaders)Sets allowedExposeHeaders of Bucket CORS.CorsConfigurationwithAllowedHeaders(List<String> allowedHeaders)Sets allowedHeaders of Bucket CORS.CorsConfigurationwithAllowedMethods(List<AllowedMethods> allowedMethods)Sets allowedMethods of Bucket CORS.CorsConfigurationwithAllowedOrigins(List<String> allowedOrigins)Sets allowedOrigins of Bucket CORS.CorsConfigurationwithMaxAgeSeconds(int maxAgeSeconds)Sets maxAgeSeconds of Bucket CORS.
-
-
-
构造器详细资料
-
CorsConfiguration
public CorsConfiguration()
The void Constructor of Bucket CORS.
-
CorsConfiguration
public CorsConfiguration(List<String> allowedOrigins, List<AllowedMethods> allowedMethods, List<String> allowedHeaders, List<String> allowedExposeHeaders, int maxAgeSeconds)
The Constructor of Bucket CORS.- 参数:
allowedOrigins- The allowedOrigins of Bucket CROS.allowedMethods- The allowedMethods of Bucket CROS.allowedHeaders- The allowedHeaders of Bucket CROS.allowedExposeHeaders- The allowedExposeHeaders of Bucket CROS.maxAgeSeconds- The maxAgeSeconds of Bucket CROS.
-
-
方法详细资料
-
getAllowedOrigins
public List<String> getAllowedOrigins()
Gets allowedOrigins of Bucket CORS.- 返回:
- allowedOrigins of Bucket CORS.
-
setAllowedOrigins
public void setAllowedOrigins(List<String> allowedOrigins)
Sets allowedOrigins of Bucket CORS.- 参数:
allowedOrigins- The allowedOrigins of Bucket CORS.
-
withAllowedOrigins
public CorsConfiguration withAllowedOrigins(List<String> allowedOrigins)
Sets allowedOrigins of Bucket CORS.- 参数:
allowedOrigins- The allowedOrigins of Bucket CORS.- 返回:
- this object.
-
getAllowedMethods
public List<AllowedMethods> getAllowedMethods()
Gets allowedMethods of Bucket CORS.- 返回:
- allowedMethods of Bucket CORS.
-
setAllowedMethods
public void setAllowedMethods(List<AllowedMethods> allowedMethods)
Sets allowedMethods of Bucket CORS.- 参数:
allowedMethods- The allowedMethods of Bucket CORS.
-
withAllowedMethods
public CorsConfiguration withAllowedMethods(List<AllowedMethods> allowedMethods)
Sets allowedMethods of Bucket CORS.- 参数:
allowedMethods- The allowedMethods of Bucket CORS.- 返回:
- this object.
-
getAllowedHeaders
public List<String> getAllowedHeaders()
Gets allowedHeaders of Bucket CORS.- 返回:
- allowedHeaders of Bucket CORS.
-
setAllowedHeaders
public void setAllowedHeaders(List<String> allowedHeaders)
Sets allowedHeaders of Bucket CORS.- 参数:
allowedHeaders- The allowedHeaders of Bucket CORS.
-
withAllowedHeaders
public CorsConfiguration withAllowedHeaders(List<String> allowedHeaders)
Sets allowedHeaders of Bucket CORS.- 参数:
allowedHeaders- The allowedHeaders of Bucket CORS.- 返回:
- this object.
-
getAllowedExposeHeaders
public List<String> getAllowedExposeHeaders()
Gets allowedExposeHeaders of Bucket CORS.- 返回:
- allowedExposeHeaders of Bucket CORS.
-
setAllowedExposeHeaders
public void setAllowedExposeHeaders(List<String> allowedExposeHeaders)
Sets allowedExposeHeaders of Bucket CORS.- 参数:
allowedExposeHeaders- The allowedExposeHeaders of Bucket CORS.
-
withAllowedExposeHeaders
public CorsConfiguration withAllowedExposeHeaders(List<String> allowedExposeHeaders)
Sets allowedExposeHeaders of Bucket CORS.- 参数:
allowedExposeHeaders- The allowedExposeHeaders of Bucket CORS.- 返回:
- this object.
-
getMaxAgeSeconds
public int getMaxAgeSeconds()
Gets maxAgeSeconds of Bucket CORS.- 返回:
- maxAgeSeconds of Bucket CORS.
-
setMaxAgeSeconds
public void setMaxAgeSeconds(int maxAgeSeconds)
Sets maxAgeSeconds of Bucket CORS.- 参数:
maxAgeSeconds- The maxAgeSeconds of Bucket CORS.
-
withMaxAgeSeconds
public CorsConfiguration withMaxAgeSeconds(int maxAgeSeconds)
Sets maxAgeSeconds of Bucket CORS.- 参数:
maxAgeSeconds- The maxAgeSeconds of Bucket CORS.- 返回:
- this object.
-
-