来自 .NET SDK 的 AttachUserPolicy

AttachUserPolicy from .NET SDK

我正在使用 SDK 创建一个新的 AWS 用户。我能够创建它,并很好地检索访问和秘密密钥。但我也想将现有策略附加到新用户,大概使用此命令

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

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

您正在寻找 AmazonIdentityManagementServiceClient.AttachUserPolicy

签名:

public virtual AttachUserPolicyResponse AttachUserPolicy(AttachUserPolicyRequest request)

要求:

响应:

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