summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
diff options
context:
space:
mode:
authorThe Magician <magic-modules@google.com>2019-10-01 15:27:03 -0700
committeransibot <ansibot@users.noreply.github.com>2019-10-01 18:27:03 -0400
commitb4d15b3040e22c88b8e508ad45a61609a2933542 (patch)
tree120b86cd21e08121c34bc9d249e24fcb3cbd647a /lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
parentecc47b653b282efe975459514ca1236e582fabb7 (diff)
downloadansible-b4d15b3040e22c88b8e508ad45a61609a2933542.tar.gz
Bug fixes for GCP modules (#61917)
Diffstat (limited to 'lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py')
-rw-r--r--lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py58
1 files changed, 52 insertions, 6 deletions
diff --git a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
index 01bb03dd8c..15d8231079 100644
--- a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
+++ b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
@@ -34,7 +34,7 @@ description:
- A named resource representing the stream of messages from a single, specific topic,
to be delivered to the subscribing application.
short_description: Creates a GCP Subscription
-version_added: 2.6
+version_added: '2.6'
author: Google Inc. (@googlecloudplatform)
requirements:
- python >= 2.6
@@ -69,7 +69,7 @@ options:
- A set of key/value label pairs to assign to this Subscription.
required: false
type: dict
- version_added: 2.8
+ version_added: '2.8'
push_config:
description:
- If push delivery is used with this subscription, this field is used to configure
@@ -134,7 +134,7 @@ options:
required: false
default: 604800s
type: str
- version_added: 2.8
+ version_added: '2.8'
retain_acked_messages:
description:
- Indicates whether to retain acknowledged messages. If `true`, then messages
@@ -142,7 +142,7 @@ options:
until they fall out of the messageRetentionDuration window.
required: false
type: bool
- version_added: 2.8
+ version_added: '2.8'
expiration_policy:
description:
- A policy that specifies the conditions for this subscription's expiration.
@@ -152,7 +152,7 @@ options:
used. The minimum allowed value for expirationPolicy.ttl is 1 day.
required: false
type: dict
- version_added: 2.9
+ version_added: '2.9'
suboptions:
ttl:
description:
@@ -165,10 +165,56 @@ options:
- Example - "3.5s".
required: false
type: str
-extends_documentation_fragment: gcp
+ project:
+ description:
+ - The Google Cloud Platform project to use.
+ type: str
+ auth_kind:
+ description:
+ - The type of credential used.
+ type: str
+ required: true
+ choices:
+ - application
+ - machineaccount
+ - serviceaccount
+ service_account_contents:
+ description:
+ - The contents of a Service Account JSON file, either in a dictionary or as a
+ JSON string that represents it.
+ type: jsonarg
+ service_account_file:
+ description:
+ - The path of a Service Account JSON file if serviceaccount is selected as type.
+ type: path
+ service_account_email:
+ description:
+ - An optional service account email address if machineaccount is selected and
+ the user does not wish to use the default email.
+ type: str
+ scopes:
+ description:
+ - Array of scopes to be used
+ type: list
+ env_type:
+ description:
+ - Specifies which Ansible environment you're running this module within.
+ - This should not be set unless you know what you're doing.
+ - This only alters the User Agent string for any API requests.
+ type: str
notes:
- 'API Reference: U(https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions)'
- 'Managing Subscriptions: U(https://cloud.google.com/pubsub/docs/admin#managing_subscriptions)'
+- for authentication, you can set service_account_file using the c(gcp_service_account_file)
+ env variable.
+- for authentication, you can set service_account_contents using the c(GCP_SERVICE_ACCOUNT_CONTENTS)
+ env variable.
+- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
+ env variable.
+- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
+- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
+- Environment variables values will only be used if the playbook values are not set.
+- The I(service_account_email) and I(service_account_file) options are mutually exclusive.
'''
EXAMPLES = '''