AWS::OpsWorks::UserProfile
描述用户的 SSH 信息。
语法
要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:
JSON
{ "Type" : "AWS::OpsWorks::UserProfile", "Properties" : { "AllowSelfManagement" :
Boolean
, "IamUserArn" :String
, "SshPublicKey" :String
, "SshUsername" :String
} }
YAML
Type: AWS::OpsWorks::UserProfile Properties: AllowSelfManagement:
Boolean
IamUserArn:String
SshPublicKey:String
SshUsername:String
属性
AllowSelfManagement
-
用户是否可以通过“我的设置”页面指定自己的 SSH 公有密钥。有关更多信息,请参阅管理用户权限。
必需:否
类型:布尔值
Update requires: No interruption
IamUserArn
-
用户的 IAM ARN。
必需:是
类型:字符串
Update requires: Replacement
SshPublicKey
-
用户的 SSH 公有密钥。
必需:否
类型:字符串
Update requires: No interruption
SshUsername
-
用户的 SSH 用户名称。
必需:否
类型:字符串
Update requires: No interruption
返回值
Ref
在将此资源的逻辑 ID 传递给内部 Ref
函数时,Ref
返回 IAM 用户 ARN,例如 arn:aws:iam::123456789012:user/opsworksuser
。
For more information about using the Ref
function, see Ref.
Fn::GetAtt
Fn::GetAtt
内部函数返回此类型的一个指定属性的值。以下为可用属性和示例返回值。
有关使用 Fn::GetAtt
内部函数的更多信息,请参阅 Fn::GetAtt。
示例
模板代码段
以下示例将一个公有密钥注册到 testUser
IAM 用户。用户也可以使用自我管理来指定其自己的公有密钥。
JSON
"userProfile": { "Type": "AWS::OpsWorks::UserProfile", "Properties": { "IamUserArn": { "Fn::GetAtt": ["testUser", "Arn"] }, "AllowSelfManagement": "true", "SshPublicKey": "xyz1234567890" } }
YAML
userProfile: Type: AWS::OpsWorks::UserProfile Properties: IamUserArn: !GetAtt [testUser, Arn] AllowSelfManagement: 'true' SshPublicKey: xyz1234567890
另请参阅
-
AWS OpsWorks API 参考 中的 CreateUserProfile。
-
AWS OpsWorks 用户指南 中的管理 AWS OpsWorks Stacks 用户权限。