Fix documentation for sns_topic module
Currently the documentation does not correspond to the Ansible standards for module documentation. This should bring it into compliance.
This commit is contained in:
parent
9199f56d80
commit
8539d6f502
1 changed files with 56 additions and 4 deletions
|
@ -1,5 +1,19 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# This is a free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This Ansible library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = """
|
||||||
module: sns_topic
|
module: sns_topic
|
||||||
|
@ -12,30 +26,35 @@ options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- The name or ARN of the SNS topic to converge
|
- The name or ARN of the SNS topic to converge
|
||||||
required: true
|
required: True
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Whether to create or destroy an SNS topic
|
- Whether to create or destroy an SNS topic
|
||||||
required: false
|
required: False
|
||||||
default: present
|
default: present
|
||||||
choices: ["absent", "present"]
|
choices: ["absent", "present"]
|
||||||
display_name:
|
display_name:
|
||||||
description:
|
description:
|
||||||
- Display name of the topic
|
- Display name of the topic
|
||||||
required: False
|
required: False
|
||||||
|
default: None
|
||||||
policy:
|
policy:
|
||||||
description:
|
description:
|
||||||
- Policy to apply to the SNS topic
|
- Policy to apply to the SNS topic
|
||||||
required: False
|
required: False
|
||||||
|
default: None
|
||||||
delivery_policy:
|
delivery_policy:
|
||||||
description:
|
description:
|
||||||
- Delivery policy to apply to the SNS topic
|
- Delivery policy to apply to the SNS topic
|
||||||
required: False
|
required: False
|
||||||
|
default: None
|
||||||
subscriptions:
|
subscriptions:
|
||||||
description:
|
description:
|
||||||
- List of subscriptions to apply to the topic. Note that AWS requires
|
- List of subscriptions to apply to the topic. Note that AWS requires
|
||||||
subscriptions to be confirmed, so you will need to confirm any new
|
subscriptions to be confirmed, so you will need to confirm any new
|
||||||
subscriptions.
|
subscriptions.
|
||||||
|
required: False
|
||||||
|
default: []
|
||||||
purge_subscriptions:
|
purge_subscriptions:
|
||||||
description:
|
description:
|
||||||
- Whether to purge any subscriptions not listed here. NOTE: AWS does not
|
- Whether to purge any subscriptions not listed here. NOTE: AWS does not
|
||||||
|
@ -43,6 +62,7 @@ options:
|
||||||
exist and would be purged, they are silently skipped. This means that
|
exist and would be purged, they are silently skipped. This means that
|
||||||
somebody could come back later and confirm the subscription. Sorry.
|
somebody could come back later and confirm the subscription. Sorry.
|
||||||
Blame Amazon.
|
Blame Amazon.
|
||||||
|
required: False
|
||||||
default: True
|
default: True
|
||||||
extends_documentation_fragment: aws
|
extends_documentation_fragment: aws
|
||||||
requirements: [ "boto" ]
|
requirements: [ "boto" ]
|
||||||
|
@ -74,6 +94,38 @@ EXAMPLES = """
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
RETURN = '''
|
||||||
|
topic_created:
|
||||||
|
description: Whether the topic was newly created
|
||||||
|
type: bool
|
||||||
|
returned: changed and state == present
|
||||||
|
sample: True
|
||||||
|
|
||||||
|
attributes_set:
|
||||||
|
description: The attributes which were changed
|
||||||
|
type: list
|
||||||
|
returned: state == "present"
|
||||||
|
sample: ["policy", "delivery_policy"]
|
||||||
|
|
||||||
|
subscriptions_added:
|
||||||
|
description: The subscriptions added to the topic
|
||||||
|
type: list
|
||||||
|
returned: state == "present"
|
||||||
|
sample: [["sms", "my_mobile_number"], ["sms", "my_mobile_2"]]
|
||||||
|
|
||||||
|
subscriptions_deleted:
|
||||||
|
description: The subscriptions deleted from the topic
|
||||||
|
type: list
|
||||||
|
returned: state == "present"
|
||||||
|
sample: [["sms", "my_mobile_number"], ["sms", "my_mobile_2"]]
|
||||||
|
|
||||||
|
sns_arn:
|
||||||
|
description: The ARN of the topic you are modifying
|
||||||
|
type: string
|
||||||
|
returned: state == "present"
|
||||||
|
sample: "arn:aws:sns:us-east-1:123456789012:my_topic_name"
|
||||||
|
'''
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
|
|
Loading…
Reference in a new issue