gpt4 book ai didi

ios - 如何生成 "AWS Authentication String"以从 iOS 向 CloudFront 发送 POST?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:43:23 26 4
gpt4 key购买 nike

我想使用 CloudFront API 来发布失效请求 (http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html)。

请求应该是这样的:

POST /2012-07-01/distribution/distribution ID/invalidation HTTP/1.0
Host: cloudfront.amazonaws.com
Authorization: AWS authentication string
Content-Type: text/xml
Other required headers

<?xml version="1.0" encoding="UTF-8"?>
<InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/">
<Paths>
<Quantity>number of objects to invalidate</Quantity>
<Items>
<Path>/path to object to invalidate</Path>
</Items>
</Paths>
<CallerReference>unique identifier for this invalidation batch</CallerReference>
</InvalidationBatch>

从我的 iPhone 应用程序生成“AWS 身份验证字符串”的最佳方法是什么?

此链接描述了如何创建字符串,但它似乎过于复杂:http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RESTAuthentication.html

如果有帮助的话,我可以访问我的 PEM 文件。

最佳答案

我没有在 AWS iOS SDK 中看到它.听起来可能 not be available just yet .这很奇怪,因为其他库,比如 Ruby 的 fogaws-cloudfront ,好像有办法。

关于ios - 如何生成 "AWS Authentication String"以从 iOS 向 CloudFront 发送 POST?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14377876/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com