community.general.hwc_smn_topic module – Creates a resource of SMNTopic in Huaweicloud Cloud
Note
This module is part of the community.general collection (version 10.0.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.hwc_smn_topic
.
Synopsis
Represents a SMN notification topic resource.
Requirements
The below requirements are needed on the host that executes this module.
requests >= 2.18.4
keystoneauth1 >= 3.6.0
Parameters
Parameter |
Comments |
---|---|
Topic display name, which is presented as the name of the email sender in an email message. The topic display name contains a maximum of 192 bytes. |
|
The name of the Domain to scope to (Identity v3). Currently only domain names are supported, and not domain IDs. |
|
The ID of resource to be managed. |
|
The Identity authentication URL. |
|
Name of the topic to be created. The topic name is a string of 1 to 256 characters. It must contain upper- or lower-case letters, digits, hyphens ( |
|
The password to login with. |
|
The name of the Tenant (Identity v2) or Project (Identity v3). Currently only project names are supported, and not project IDs. |
|
The region to which the project belongs. |
|
Whether the given object should exist in Huaweicloud Cloud. Choices:
|
|
The user name to login with. Currently only user names are supported, and not user IDs. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
For authentication, you can set identity_endpoint using the
ANSIBLE_HWC_IDENTITY_ENDPOINT
environment variable.For authentication, you can set user using the
ANSIBLE_HWC_USER
environment variable.For authentication, you can set password using the
ANSIBLE_HWC_PASSWORD
environment variable.For authentication, you can set domain using the
ANSIBLE_HWC_DOMAIN
environment variable.For authentication, you can set project using the
ANSIBLE_HWC_PROJECT
environment variable.For authentication, you can set region using the
ANSIBLE_HWC_REGION
environment variable.Environment variables values will only be used if the playbook values are not set.
Examples
- name: Create a smn topic
community.general.hwc_smn_topic:
identity_endpoint: "{{ identity_endpoint }}"
user_name: "{{ user_name }}"
password: "{{ password }}"
domain_name: "{{ domain_name }}"
project_name: "{{ project_name }}"
region: "{{ region }}"
name: "ansible_smn_topic_test"
state: present
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Time when the topic was created. Returned: success |
|
Topic display name, which is presented as the name of the email sender in an email message. The topic display name contains a maximum of 192 bytes. Returned: success |
|
Name of the topic to be created. The topic name is a string of 1 to 256 characters. It must contain upper- or lower-case letters, digits, hyphens ( Returned: success |
|
Message pushing policy. 0 indicates that the message sending fails and the message is cached in the queue. 1 indicates that the failed message is discarded. Returned: success |
|
Resource identifier of a topic, which is unique. Returned: success |
|
Time when the topic was updated. Returned: success |