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
 
Generate signed cookies that allows access to a specific distribution and resource path by applying a access restrictions from a "canned" (simplified) policy document.

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

Syntax

C#
public CookiesForCannedPolicy GetCookiesForCannedPolicy(
         String resourceUrlOrPath,
         String keyPairId,
         FileSystemInfo privateKey,
         DateTime expiresOn
)

Parameters

resourceUrlOrPath
Type: System.String

The URL or path that uniquely identifies a resource within a distribution. For standard distributions the resource URL will be "http://" + distributionName + "/" + path (may also include URL parameters. For distributions with the HTTPS required protocol, the resource URL must start with "https://". RTMP resources do not take the form of a URL, and instead the resource path is nothing but the stream's name.

keyPairId
Type: System.String

Identifier of a public/private certificate keypair already configured in your Amazon Web Services account.

privateKey
Type: System.IO.FileSystemInfo

The RSA private key data that corresponding to the certificate keypair identified by keyPairId.

expiresOn
Type: System.DateTime

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

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

Version Information

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