Fix RETURN section document in iam_role.py (#28430)

This commit is contained in:
KrdLab 2017-09-15 17:21:27 +09:00 committed by ansibot
commit e0a5b7d7ea

View file

@ -90,58 +90,63 @@ EXAMPLES = '''
''' '''
RETURN = ''' RETURN = '''
path: iam_role:
description: the path to the role description: dictionary containing the IAM Role data
type: string returned: success
returned: always type: complex
sample: / contains:
role_name: path:
description: the friendly name that identifies the role description: the path to the role
type: string type: string
returned: always returned: always
sample: myrole sample: /
role_id: role_name:
description: the stable and unique string identifying the role description: the friendly name that identifies the role
type: string type: string
returned: always returned: always
sample: ABCDEFF4EZ4ABCDEFV4ZC sample: myrole
arn: role_id:
description: the Amazon Resource Name (ARN) specifying the role description: the stable and unique string identifying the role
type: string type: string
returned: always returned: always
sample: "arn:aws:iam::1234567890:role/mynewrole" sample: ABCDEFF4EZ4ABCDEFV4ZC
create_date: arn:
description: the date and time, in ISO 8601 date-time format, when the role was created description: the Amazon Resource Name (ARN) specifying the role
type: string type: string
returned: always returned: always
sample: "2016-08-14T04:36:28+00:00" sample: "arn:aws:iam::1234567890:role/mynewrole"
assume_role_policy_document: create_date:
description: the policy that grants an entity permission to assume the role description: the date and time, in ISO 8601 date-time format, when the role was created
type: string type: string
returned: always returned: always
sample: { sample: "2016-08-14T04:36:28+00:00"
'statement': [ assume_role_policy_document:
{ description: the policy that grants an entity permission to assume the role
'action': 'sts:AssumeRole', type: string
'effect': 'Allow', returned: always
'principal': { sample: {
'service': 'ec2.amazonaws.com' 'statement': [
}, {
'sid': '' 'action': 'sts:AssumeRole',
'effect': 'Allow',
'principal': {
'service': 'ec2.amazonaws.com'
},
'sid': ''
}
],
'version': '2012-10-17'
} }
], attached_policies:
'version': '2012-10-17' description: a list of dicts containing the name and ARN of the managed IAM policies attached to the role
} type: list
attached_policies: returned: always
description: a list of dicts containing the name and ARN of the managed IAM policies attached to the role sample: [
type: list {
returned: always 'policy_arn': 'arn:aws:iam::aws:policy/PowerUserAccess',
sample: [ 'policy_name': 'PowerUserAccess'
{ }
'policy_arn': 'arn:aws:iam::aws:policy/PowerUserAccess', ]
'policy_name': 'PowerUserAccess'
}
]
''' '''
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule