c# - 来自 .NET SDK 的 AttachUserPolicy

标签 c# amazon-web-services aws-sdk amazon-iam

我正在使用开发工具包创建一个新的 AWS 用户。我能够创建它,并检索访问 key 和 secret key 。但我还想将现有策略附加到新用户,大概使用此命令

http://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html

.NET SDK 中是否存在此方法?经过大量疯狂的搜索后我找不到它。

最佳答案

您正在寻找AmazonIdentityManagementServiceClient.AttachUserPolicy .

签名:

public virtual AttachUserPolicyResponse AttachUserPolicy(AttachUserPolicyRequest request)

请求:

回应:

还有一个async version ,如果您有兴趣。

关于c# - 来自 .NET SDK 的 AttachUserPolicy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30492843/

相关文章:

php - 收到错误AWS HTTP错误: cURL error 6: when creation bucket using 3. 52 php sdk

c# - 将 Quartz.NET 触发器设置为在特定对象实例上触发

java - 我如何知道 AmazonS3Client 是否已关闭?

c# - 类型参数统一

amazon-web-services - Kubernetes/kops : error attaching EBS volume to instance. 您无权执行此操作。错误 403

amazon-web-services - 删除 AWS CloudFormation 堆栈但保留 Route53 记录集

linux - 将文件从 Amazon S3 同步到本地

ruby was-sdk v2:Seahorse::Client::NetworkingError 异常:SSL_connect

c# - asp.net在url重写后获取查询字符串值

c# - 将 Visual Studio 2010 工作区与 Visual Studio 2013 工作区相结合