@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-11T17:58:48.883Z") @Stability(value=Stable) public enum ViewerProtocolPolicy extends 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(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.
|
@Stability(value=Stable) public static final ViewerProtocolPolicy HTTPS_ONLY
@Stability(value=Stable) public static final ViewerProtocolPolicy REDIRECT_TO_HTTPS
@Stability(value=Stable) public static final ViewerProtocolPolicy ALLOW_ALL
public static ViewerProtocolPolicy[] values()
for (ViewerProtocolPolicy c : ViewerProtocolPolicy.values()) System.out.println(c);
public static ViewerProtocolPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.