@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-25T18:29:07.446Z") public enum ViewerProtocolPolicy extends java.lang.Enum<ViewerProtocolPolicy>
Example:
// Create a Distribution with configured HTTP methods and viewer protocol policy of the cache. Bucket myBucket; Distribution myWebDistribution = Distribution.Builder.create(this, "myDist") .defaultBehavior(BehaviorOptions.builder() .origin(new S3Origin(myBucket)) .allowedMethods(AllowedMethods.ALLOW_ALL) .viewerProtocolPolicy(ViewerProtocolPolicy.REDIRECT_TO_HTTPS) .build()) .build();
Enum Constant and Description |
---|
ALLOW_ALL
Both HTTP and HTTPS supported.
|
HTTPS_ONLY
HTTPS only.
|
REDIRECT_TO_HTTPS
Will redirect HTTP requests to HTTPS.
|
Modifier and Type | Method and Description |
---|---|
static ViewerProtocolPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ViewerProtocolPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ViewerProtocolPolicy HTTPS_ONLY
public static final ViewerProtocolPolicy REDIRECT_TO_HTTPS
public static final ViewerProtocolPolicy ALLOW_ALL
public static ViewerProtocolPolicy[] values()
for (ViewerProtocolPolicy c : ViewerProtocolPolicy.values()) System.out.println(c);
public static ViewerProtocolPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null