3535requirements: 
3636  - cdpy 
3737options: 
38-   name : 
38+   cluster_id : 
3939    description: 
4040      - The identifier of the Data Warehouse Cluster. 
41-       - Required if C (state=absent) and C (env) is not specified. 
41+       - Required if I (state=absent) and I (env) is not specified. 
4242    type: str 
4343    aliases: 
4444      - id 
45+       - name 
4546  env: 
4647    description: 
4748      - The name of the target environment. 
48-       - Required if C(state=present) or C(state=absent) and C(id) is not specified. 
49+       - Required if I(state=present). 
50+       - Required if I(state=absent) and I(cluster_id) is not specified. 
4951    type: str 
5052    aliases: 
5153      - environment 
6365  aws_public_subnets: 
6466    description: 
6567      - List of zero or more Public AWS Subnet IDs used for deployment. 
66-       - Required if C (state=present) and the C (env) is deployed to AWS. 
68+       - Required if I (state=present) and the I (env) is deployed to AWS. 
6769    type: list 
6870    elements: str 
6971  aws_private_subnets: 
7072    description: 
7173      - List of zero or more Private AWS Subnet IDs used for deployment. 
72-       - Required if C (state=present) and the C (env) is deployed to AWS. 
74+       - Required if I (state=present) and the I (env) is deployed to AWS. 
7375    type: list 
7476    elements: str 
7577  az_subnet: 
7678    description: 
7779      - The Azure Subnet Name. 
78-       - Required if C (state=present) and the C (env) is deployed to Azure. 
80+       - Required if I (state=present) and the I (env) is deployed to Azure. 
7981    type: str 
8082  az_enable_az: 
8183    description:  
8284      - Flag to enable Availability Zone mode. 
83-       - Required if C (state=present) and the C (env) is deployed to Azure. 
85+       - Required if I (state=present) and the I (env) is deployed to Azure. 
8486    type: bool 
8587  state: 
8688    description: The state of the Data Warehouse Cluster 
154156  description: Details for the Data Warehouse cluster 
155157  type: dict 
156158  contains: 
157-     name : 
158-       description: The name of the  cluster. 
159+     id : 
160+       description: The cluster identifier . 
159161      returned: always 
160162      type: str 
161163    environmentCrn: 
162-       description: The crn  of the cluster's environment.  
164+       description: The CRN  of the cluster's Environment  
163165      returned: always 
164166      type: str 
165167    crn: 
166168      description: The cluster's CRN. 
167169      returned: always 
168170      type: str 
169171    creationDate: 
170-       description: The creation time  of the cluster in UTC. 
172+       description: The creation timestamp  of the cluster in UTC. 
171173      returned: always 
172174      type: str 
173175    status: 
174-       description: The status of the cluster.  
176+       description: The status of the cluster 
175177      returned: always 
176178      type: str 
177179    creator: 
178-       description: The details regarding the  cluster creator. 
180+       description: The cluster creator details . 
179181      returned: always 
180182      type: dict 
181183      contains: 
182184        crn: 
185+           description: The Actor CRN. 
183186          type: str 
184-           description: The creator's CRN  
187+           returned: always  
185188        email: 
189+           description: Email address (users). 
186190          type: str 
187-           description: Email address  
191+           returned: when supported  
188192        workloadUsername: 
193+           description: Username (users). 
189194          type: str 
190-           description: Username  
195+           returned: when supported  
191196        machineUsername: 
197+           description: Username (machine users). 
192198          type: str 
193-           description: Username for machine users  
199+           returned: when supported  
194200    cloudPlatform: 
195-       description: The cloud platform of the environment housing the Data Warehouse  cluster 
201+       description: The cloud platform of the environment that was used to create this  cluster.  
196202      returned: always 
197203      type: str 
198204sdk_out: 
@@ -325,14 +331,14 @@ def process(self):
325331def  main ():
326332    module  =  AnsibleModule (
327333        argument_spec = CdpModule .argument_spec (
328-             name = dict (type = 'str' , aliases = ['id' ]),
334+             cluster_id = dict (type = 'str' , aliases = ['id'  ,  'name '
329335            env = dict (type = 'str' , aliases = ['environment' , 'env_crn' ]),
330336            overlay = dict (type = 'bool' , default = False ),
331337            private_load_balancer = dict (type = 'bool' , default = False ),
332-             az_subnet = dict (type = 'str' ,  default = None ),
333-             az_enable_az = dict (type = 'bool' ,  default = None ),
334-             aws_public_subnets = dict (type = 'list' ,  default = None ),
335-             aws_private_subnets = dict (type = 'list' ,  default = None ),
338+             az_subnet = dict (type = 'str' ),
339+             az_enable_az = dict (type = 'bool' ),
340+             aws_public_subnets = dict (type = 'list' ),
341+             aws_private_subnets = dict (type = 'list' ),
336342            state = dict (type = 'str' , choices = ['present' , 'absent' ], default = 'present' ),
337343            force = dict (type = 'bool' , default = False ),
338344            wait = dict (type = 'bool' , default = True ),
@@ -344,7 +350,7 @@ def main():
344350            ['aws_public_subnets' , 'aws_private_subnets' ]
345351        ],
346352        required_if = [
347-             ['state' , 'absent' , ['name ' , 'env' ]],
353+             ['state' , 'absent' , ['cluster_id ' , 'env' ],  True ],
348354            ['state' , 'present' , ['env' ]]
349355        ],
350356        supports_check_mode = True 
0 commit comments