AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
Returns signed cookies that provides tailored access to private content based on an access time window and an ip range.

Namespace: Amazon.CloudFront
Assembly: AWSSDK.dll
Version: (assembly version)


public CookiesForCustomPolicy GetCookiesForCustomPolicy(
         String resourceUrlOrPath,
         TextReader privateKey,
         String keyPairId,
         DateTime expiresOn,
         DateTime activeFrom,
         String ipRange


Type: System.String

The URL or path for resource within a distribution.

Type: System.IO.TextReader

Your private key file. RSA private key (.pem) are supported.

Type: System.String

The key pair id corresponding to the private key file given.

Type: System.DateTime

The expiration date till which content can be accessed using the generated cookies.

Type: System.DateTime

The date from which content can be accessed using the generated cookies.

Type: System.String

The allowed IP address range of the client making the GET request, in CIDR form (e.g.

Return Value
Type: Amazon.CloudFront.CookiesForCustomPolicy
The signed cookies.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5