aws-cloudfront-signed-cookies-0.2.0.8: Generate signed cookies for AWS CloudFront
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CloudFront.SignedCookies.Policy

Synopsis

Defining a policy

data Policy Source #

A policy specifies what resource is being granted, for what time period, and to what IP addresses.

For AWS's documentation on what going into a CloudFront policy statement, see Values That You Specify in the Policy Statement for a Custom Policy for Signed Cookies.

Constructors

Policy 

Fields

Instances

Instances details
Eq Policy Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

Methods

(==) :: Policy -> Policy -> Bool #

(/=) :: Policy -> Policy -> Bool #

Show Policy Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

simplePolicy Source #

Arguments

:: Resource

URL that the policy will grant access to, optionally containing asterisks for wildcards

-> Lifespan

How long from now the credentials expire

-> IO Policy 

This function provides one convenient way to construct a simple Policy.

For the full set of policy options, use the Policy constructor directly.

Components of a policy

newtype Resource Source #

URL that a policy will grant access to, optionally containing asterisks for wildcards.

Examples:

  • "https://d123example.cloudfront.net/index.html"
  • "https://d123example.cloudfront.net/*.jpeg"

Constructors

Resource Text 

Instances

Instances details
Eq Resource Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

Show Resource Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

data StartTime Source #

The time at which credentials begin to take effect

Instances

Instances details
Eq StartTime Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

Show StartTime Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

newtype EndTime Source #

The time at which credentials expire

Constructors

EndTime POSIXTime 

Instances

Instances details
Eq EndTime Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

Methods

(==) :: EndTime -> EndTime -> Bool #

(/=) :: EndTime -> EndTime -> Bool #

Show EndTime Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

newtype Lifespan Source #

How long from now the credentials expire

Instances

Instances details
Eq Lifespan Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

Show Lifespan Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

data IpAddress Source #

The IP address or address range of clients allowed to make requests

Constructors

AnyIp 
IpAddress Text 

Instances

Instances details
Eq IpAddress Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

Show IpAddress Source # 
Instance details

Defined in Network.AWS.CloudFront.SignedCookies.Types

JSON representation

policyJSON :: Policy -> ByteString Source #

Encode a Policy as JSON, with no whitespace, as AWS requires.

Excerpt from Setting Signed Cookies Using a Custom Policy:

  • "Remove all whitespace (including tabs and newline characters) from the policy statement."