Debian Codegraph @

ansible_collections/community/general/plugins/doc_fragments/_alicloud.py

raw
1 # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin <[email protected]>
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 # Note that this doc fragment is **PRIVATE** to the collection. It can have breaking changes at any time.
6 # Do not use this from other collections or standalone plugins/modules!
7
8 from __future__ import annotations
9
10
11 class ModuleDocFragment:
12 # Alicloud only documentation fragment
13 DOCUMENTATION = r"""
14 options:
15 alicloud_access_key:
16 description:
17 - Alibaba Cloud access key. If not set then the value of environment variable E(ALICLOUD_ACCESS_KEY), E(ALICLOUD_ACCESS_KEY_ID)
18 is used instead.
19 aliases: ['access_key_id', 'access_key']
20 type: str
21 alicloud_secret_key:
22 description:
23 - Alibaba Cloud secret key. If not set then the value of environment variable E(ALICLOUD_SECRET_KEY), E(ALICLOUD_SECRET_ACCESS_KEY)
24 is used instead.
25 aliases: ['secret_access_key', 'secret_key']
26 type: str
27 alicloud_region:
28 description:
29 - The Alibaba Cloud region to use. If not specified then the value of environment variable E(ALICLOUD_REGION), E(ALICLOUD_REGION_ID)
30 is used instead.
31 aliases: ['region', 'region_id']
32 required: true
33 type: str
34 alicloud_security_token:
35 description:
36 - The Alibaba Cloud security token. If not specified then the value of environment variable E(ALICLOUD_SECURITY_TOKEN)
37 is used instead.
38 aliases: ['security_token']
39 type: str
40 alicloud_assume_role:
41 description:
42 - If provided with a role ARN, Ansible attempts to assume this role using the supplied credentials.
43 - The nested assume_role block supports C(alicloud_assume_role_arn), C(alicloud_assume_role_session_name), C(alicloud_assume_role_session_expiration)
44 and C(alicloud_assume_role_policy).
45 type: dict
46 aliases: ['assume_role']
47 alicloud_assume_role_arn:
48 description:
49 - The Alibaba Cloud C(role_arn). The ARN of the role to assume. If ARN is set to an empty string, it does not perform
50 role switching. It supports environment variable E(ALICLOUD_ASSUME_ROLE_ARN). Ansible executes with provided credentials.
51 aliases: ['assume_role_arn']
52 type: str
53 alicloud_assume_role_session_name:
54 description:
55 - The Alibaba Cloud session_name. The session name to use when assuming the role. If omitted, 'ansible' is passed to
56 the AssumeRole call as session name. It supports environment variable E(ALICLOUD_ASSUME_ROLE_SESSION_NAME).
57 aliases: ['assume_role_session_name']
58 type: str
59 alicloud_assume_role_session_expiration:
60 description:
61 - The Alibaba Cloud C(session_expiration). The time after which the established session for assuming role expires. Valid
62 value range 900-3600 seconds. Default to 3600 (in this case Alicloud use own default value). It supports environment
63 variable E(ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION).
64 aliases: ['assume_role_session_expiration']
65 type: int
66 ecs_role_name:
67 description:
68 - The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section
69 of the Alibaba Cloud console.
70 - If you are running Ansible from an ECS instance with RAM Instance using RAM Role, Ansible just accesses the metadata
71 U(http://100.100.100.200/latest/meta-data/ram/security-credentials/<ecs_role_name>) to obtain the STS credential.
72 This is a preferred approach over any other when running in ECS as you can avoid hard coding credentials. Instead
73 these are leased on-the-fly by Ansible which reduces the chance of leakage.
74 aliases: ['role_name']
75 type: str
76 profile:
77 description:
78 - This is the Alicloud profile name as set in the shared credentials file. It can also be sourced from the E(ALICLOUD_PROFILE)
79 environment variable.
80 type: str
81 shared_credentials_file:
82 description:
83 - This is the path to the shared credentials file. It can also be sourced from the E(ALICLOUD_SHARED_CREDENTIALS_FILE)
84 environment variable.
85 - If this is not set and a profile is specified, C(~/.aliyun/config.json) is used.
86 type: str
87 author:
88 - "He Guimin (@xiaozhu36)"
89 requirements:
90 - "Python >= 3.6"
91 notes:
92 - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence
93 E(ALICLOUD_ACCESS_KEY) or E(ALICLOUD_ACCESS_KEY_ID), E(ALICLOUD_SECRET_KEY) or E(ALICLOUD_SECRET_ACCESS_KEY), E(ALICLOUD_REGION)
94 or E(ALICLOUD_REGION_ID), E(ALICLOUD_SECURITY_TOKEN), E(ALICLOUD_ECS_ROLE_NAME), E(ALICLOUD_SHARED_CREDENTIALS_FILE),
95 E(ALICLOUD_PROFILE), E(ALICLOUD_ASSUME_ROLE_ARN), E(ALICLOUD_ASSUME_ROLE_SESSION_NAME), E(ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION).
96 - E(ALICLOUD_REGION) or E(ALICLOUD_REGION_ID) can be typically be used to specify the Alicloud region, when required, but
97 this can also be configured in the footmark config file.
98 """