Amazon.CloudFront.AmazonCloudFrontUrlSigner.SignUrl C# (CSharp) Метод

SignUrl() публичный статический Метод

Generate a signed URL that allows access to distribution and resource path by applying access restrictions specified in a custom policy document.
public static SignUrl ( string resourceUrlOrPath, string keyPairId, FileInfo privateKey, string policy ) : string
resourceUrlOrPath 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 string Identifier of a public/private certificate keypair already configured in your Amazon Web Services account.
privateKey System.IO.FileInfo The RSA private key data that corresponding to the certificate keypair identified by keyPairId.
policy string A policy document that describes the access permissions that will be applied by /// the signed URL. To generate a custom policy use
Результат string
        public static string SignUrl(string resourceUrlOrPath, string keyPairId, FileInfo privateKey, string policy)
        {
            using (StreamReader reader = new StreamReader(File.OpenRead(privateKey.FullName)))
            {
                return SignUrl(resourceUrlOrPath, keyPairId, reader, policy);
            }
        }

Same methods

AmazonCloudFrontUrlSigner::SignUrl ( string resourceUrlOrPath, string keyPairId, TextReader privateKey, string policy ) : string