Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoscaling_instance_refresh - prepare modules for promotion #2150

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

abikouo
Copy link
Contributor

@abikouo abikouo commented Sep 20, 2024

SUMMARY

Depends-On: ansible-collections/amazon.aws#2301
Closes #2120
Closes #2019
Closes #2016

Prepare modules autoscaling_instance_refresh and autoscaling_instance_refresh_info for promotion:

  • Refactor modules to use common code from ansible_collections.amazon.aws.plugins.module_utils.autoscaling
  • Add type hinting
  • Update integration tests
ISSUE TYPE
  • Feature Pull Request

Copy link

github-actions bot commented Sep 20, 2024

Docs Build 📝

Thank you for contribution!✨

The docsite for this PR is available for download as an artifact from this run:
https://github.com/ansible-collections/community.aws/actions/runs/10991802472

You can compare to the docs for the main branch here:
https://ansible-collections.github.io/community.aws/branch/main

File changes:

  • M collections/community/aws/autoscaling_instance_refresh_info_module.html
  • M collections/community/aws/autoscaling_instance_refresh_module.html
Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

diff --git a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/autoscaling_instance_refresh_info_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/autoscaling_instance_refresh_info_module.html
index 4e74116..41db6c1 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/autoscaling_instance_refresh_info_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/autoscaling_instance_refresh_info_module.html
@@ -399,75 +399,100 @@ see <a class="reference internal" href="#ansible-collections-community-aws-autos
 </thead>
 <tbody>
 <tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-auto_scaling_group_name"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-auto-scaling-group-name"><strong>auto_scaling_group_name</strong></p>
-<a class="ansibleOptionLink" href="#return-auto_scaling_group_name" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<div class="ansibleOptionAnchor" id="return-instance_refreshes"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes"><strong>instance_refreshes</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">complex</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>Name of autoscaling group</p>
+<td><div class="ansible-option-cell"><p>A list of instance refreshes.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/auto_scaling_group_name"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-auto-scaling-group-name"><strong>auto_scaling_group_name</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/auto_scaling_group_name" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Name of autoscaling group.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;public-webapp-production-1&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-end_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-end-time"><strong>end_time</strong></p>
-<a class="ansibleOptionLink" href="#return-end_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/end_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-end-time"><strong>end_time</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/end_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;2015-11-25T00:05:36.309Z&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-instance_refresh_id"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refresh-id"><strong>instance_refresh_id</strong></p>
-<a class="ansibleOptionLink" href="#return-instance_refresh_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/instance_refresh_id"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-instance-refresh-id"><strong>instance_refresh_id</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/instance_refresh_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>instance refresh id</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>instance refresh id.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;08b91cf7-8fa6-48af-b6a6-d227f40f1b9b&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-instances_to_update"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instances-to-update"><strong>instances_to_update</strong></p>
-<a class="ansibleOptionLink" href="#return-instances_to_update" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/instances_to_update"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-instances-to-update"><strong>instances_to_update</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/instances_to_update" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>num. of instance to update</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>number of instances to update.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">5</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-percentage_complete"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-percentage-complete"><strong>percentage_complete</strong></p>
-<a class="ansibleOptionLink" href="#return-percentage_complete" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/percentage_complete"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-percentage-complete"><strong>percentage_complete</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/percentage_complete" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>the % of completeness</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>the % of completeness</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">100</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-start_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-start-time"><strong>start_time</strong></p>
-<a class="ansibleOptionLink" href="#return-start_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/preferences"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-preferences"><strong>preferences</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/preferences" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The preferences for an instance refresh.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
+<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{&quot;AlarmSpecification&quot;:</span> <span class="pre">{&quot;Alarms&quot;:</span> <span class="pre">[&quot;my-alarm&quot;]},</span> <span class="pre">&quot;AutoRollback&quot;:</span> <span class="pre">true,</span> <span class="pre">&quot;InstanceWarmup&quot;:</span> <span class="pre">200,</span> <span class="pre">&quot;MinHealthyPercentage&quot;:</span> <span class="pre">90,</span> <span class="pre">&quot;ScaleInProtectedInstances&quot;:</span> <span class="pre">&quot;Ignore&quot;,</span> <span class="pre">&quot;SkipMatching&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;StandbyInstances&quot;:</span> <span class="pre">&quot;Ignore&quot;}</span></code></p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/start_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-start-time"><strong>start_time</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/start_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;2015-11-25T00:05:36.309Z&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-status"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-status"><strong>status</strong></p>
-<a class="ansibleOptionLink" href="#return-status" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/status"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-instance-refreshes-status"><strong>status</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/status" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>The current state of the group when DeleteAutoScalingGroup is in progress.</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The current state of the group when DeleteAutoScalingGroup is in progress.</p>
 <p>The following are the possible statuses</p>
-<p><code class="docutils literal notranslate"><span class="pre">Pending</span></code> - The request was created, but the operation has not started.</p>
-<p><code class="docutils literal notranslate"><span class="pre">InProgress</span></code> - The operation is in progress.</p>
-<p><code class="docutils literal notranslate"><span class="pre">Successful</span></code> - The operation completed successfully.</p>
-<p><code class="docutils literal notranslate"><span class="pre">Failed</span></code> - The operation failed to complete. You can troubleshoot using the status reason and the scaling activities.</p>
-<p><code class="docutils literal notranslate"><span class="pre">Cancelling</span></code> - An ongoing operation is being cancelled. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started.</p>
-<p><code class="docutils literal notranslate"><span class="pre">Cancelled</span></code> - The operation is cancelled.’</p>
+<p>Pending - The request was created, but the operation has not started.</p>
+<p>InProgress - The operation is in progress.</p>
+<p>Successful - The operation completed successfully.</p>
+<p>Failed - The operation failed to complete. You can troubleshoot using the status reason and the scaling activities.</p>
+<p>Cancelling - An ongoing operation is being cancelled. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started.</p>
+<p>Cancelled - The operation is cancelled.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;Pending&quot;</span></code></p>
 </div></td>
 </tr>
+<tr class="row-odd"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-next_token"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-info-module-return-next-token"><strong>next_token</strong></p>
+<a class="ansibleOptionLink" href="#return-next_token" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>A string that indicates that the response contains more items than can be returned in a single response.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
+</div></td>
+</tr>
 </tbody>
 </table>
 <section id="authors">
diff --git a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/autoscaling_instance_refresh_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/autoscaling_instance_refresh_module.html
index cd10064..c97b9d4 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/autoscaling_instance_refresh_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/autoscaling_instance_refresh_module.html
@@ -271,14 +271,40 @@ see <a class="reference internal" href="#ansible-collections-community-aws-autos
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="parameter-preferences/max_healthy_percentage"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-parameter-preferences-max-healthy-percentage"><strong>max_healthy_percentage</strong></p>
+<a class="ansibleOptionLink" href="#parameter-preferences/max_healthy_percentage" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
+<p><em class="ansible-option-versionadded">added in community.aws 9.0.0</em></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Specifies the maximum percentage of the group that can be in service and healthy, or pending, to support your workload when replacing instances.</p>
+<p>The value is expressed as a percentage of the desired capacity of the Auto Scaling group.</p>
+<p>Value range is <code class="ansible-value docutils literal notranslate"><span class="pre">100</span></code> to <code class="ansible-value docutils literal notranslate"><span class="pre">200</span></code>.</p>
+<p>When specified, you must also specify <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-aws-autoscaling-instance-refresh-module-parameter-preferences-min-healthy-percentage"><span class="std std-ref"><span class="pre">preferences.min_healthy_percentage</span></span></a></strong></code>, and the difference between them cannot be greater than 100.</p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-preferences/min_healthy_percentage"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-parameter-preferences-min-healthy-percentage"><strong>min_healthy_percentage</strong></p>
 <a class="ansibleOptionLink" href="#parameter-preferences/min_healthy_percentage" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
 </div></td>
 <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Total percent of capacity in ASG that must remain healthy during instance refresh to allow operation to continue.</p>
 <p>It is rounded up to the nearest integer.</p>
+<p>Value range is <code class="ansible-value docutils literal notranslate"><span class="pre">0</span></code> to <code class="ansible-value docutils literal notranslate"><span class="pre">100</span></code>.</p>
 <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">90</span></code></p>
 </div></td>
 </tr>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="parameter-preferences/skip_matching"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-parameter-preferences-skip-matching"><strong>skip_matching</strong></p>
+<a class="ansibleOptionLink" href="#parameter-preferences/skip_matching" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
+<p><em class="ansible-option-versionadded">added in community.aws 9.0.0</em></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Indicates whether skip matching is enabled.</p>
+<p>If enabled <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, then Amazon EC2 Auto Scaling skips replacing instances that match the desired configuration.</p>
+<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
+<ul class="simple">
+<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
+<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
+</ul>
+</div></td>
+</tr>
 <tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-profile"></div>
 <div class="ansibleOptionAnchor" id="parameter-aws_profile"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-parameter-profile"><span id="ansible-collections-community-aws-autoscaling-instance-refresh-module-parameter-aws-profile"></span><strong>profile</strong></p>
@@ -411,6 +437,7 @@ see <a class="reference internal" href="#ansible-collections-community-aws-autos
 <span class="w">    </span><span class="nt">preferences</span><span class="p">:</span>
 <span class="w">      </span><span class="nt">min_healthy_percentage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">91</span>
 <span class="w">      </span><span class="nt">instance_warmup</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">60</span>
+<span class="w">      </span><span class="nt">skip_matching</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
 </pre></div>
 </div>
 </section>
@@ -425,74 +452,88 @@ see <a class="reference internal" href="#ansible-collections-community-aws-autos
 </thead>
 <tbody>
 <tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-auto_scaling_group_name"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-auto-scaling-group-name"><strong>auto_scaling_group_name</strong></p>
-<a class="ansibleOptionLink" href="#return-auto_scaling_group_name" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<div class="ansibleOptionAnchor" id="return-instance_refreshes"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes"><strong>instance_refreshes</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">complex</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>Name of autoscaling group</p>
+<td><div class="ansible-option-cell"><p>Details of the instance refreshes for the Auto Scaling group..</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/auto_scaling_group_name"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-auto-scaling-group-name"><strong>auto_scaling_group_name</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/auto_scaling_group_name" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Name of autoscaling group.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;public-webapp-production-1&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-end_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-end-time"><strong>end_time</strong></p>
-<a class="ansibleOptionLink" href="#return-end_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/end_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-end-time"><strong>end_time</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/end_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;2015-11-25T00:05:36.309Z&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-instance_refresh_id"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refresh-id"><strong>instance_refresh_id</strong></p>
-<a class="ansibleOptionLink" href="#return-instance_refresh_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/instance_refresh_id"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-instance-refresh-id"><strong>instance_refresh_id</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/instance_refresh_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>instance refresh id</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>instance refresh id.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;08b91cf7-8fa6-48af-b6a6-d227f40f1b9b&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-instances_to_update"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instances-to-update"><strong>instances_to_update</strong></p>
-<a class="ansibleOptionLink" href="#return-instances_to_update" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/instances_to_update"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-instances-to-update"><strong>instances_to_update</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/instances_to_update" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>num. of instance to update</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>number of instances to update.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">5</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-percentage_complete"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-percentage-complete"><strong>percentage_complete</strong></p>
-<a class="ansibleOptionLink" href="#return-percentage_complete" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/percentage_complete"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-percentage-complete"><strong>percentage_complete</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/percentage_complete" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>the % of completeness</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>the % of completeness.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">100</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-start_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-start-time"><strong>start_time</strong></p>
-<a class="ansibleOptionLink" href="#return-start_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/preferences"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-preferences"><strong>preferences</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/preferences" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The preferences for an instance refresh.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
+<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{&quot;AlarmSpecification&quot;:</span> <span class="pre">{&quot;Alarms&quot;:</span> <span class="pre">[&quot;my-alarm&quot;]},</span> <span class="pre">&quot;AutoRollback&quot;:</span> <span class="pre">true,</span> <span class="pre">&quot;InstanceWarmup&quot;:</span> <span class="pre">200,</span> <span class="pre">&quot;MinHealthyPercentage&quot;:</span> <span class="pre">90,</span> <span class="pre">&quot;ScaleInProtectedInstances&quot;:</span> <span class="pre">&quot;Ignore&quot;,</span> <span class="pre">&quot;SkipMatching&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;StandbyInstances&quot;:</span> <span class="pre">&quot;Ignore&quot;}</span></code></p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/start_time"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-start-time"><strong>start_time</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/start_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The date and time this ASG was created, in ISO 8601 format.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;2015-11-25T00:05:36.309Z&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="return-status"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-status"><strong>status</strong></p>
-<a class="ansibleOptionLink" href="#return-status" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-instance_refreshes/status"></div><p class="ansible-option-title" id="ansible-collections-community-aws-autoscaling-instance-refresh-module-return-instance-refreshes-status"><strong>status</strong></p>
+<a class="ansibleOptionLink" href="#return-instance_refreshes/status" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>The current state of the group when DeleteAutoScalingGroup is in progress.</p>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The current state of the group when DeleteAutoScalingGroup is in progress.</p>
 <p>The following are the possible statuses</p>
-<p>Pending – The request was created, but the operation has not started.</p>
-<p>InProgress – The operation is in progress.</p>
-<p>Successful – The operation completed successfully.</p>
-<p>Failed – The operation failed to complete. You can troubleshoot using the status reason and the scaling activities.</p>
-<p>Cancelling –</p>
-<p>An ongoing operation is being cancelled.</p>
-<p>Cancellation does not roll back any replacements that have already been completed,</p>
-<p>but it prevents new replacements from being started.</p>
-<p>Cancelled – The operation is cancelled.</p>
+<p>Pending - The request was created, but the operation has not started.</p>
+<p>InProgress - The operation is in progress.</p>
+<p>Successful - The operation completed successfully.</p>
+<p>Failed - The operation failed to complete. You can troubleshoot using the status reason and the scaling activities.</p>
+<p>Cancelling - An ongoing operation is being cancelled. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started.</p>
+<p>Cancelled - The operation is cancelled.</p>
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;Pending&quot;</span></code></p>
 </div></td>

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/1540c9bf69d94065b940a53da2e12675

✔️ ansible-galaxy-importer SUCCESS in 3m 42s (non-voting)
✔️ build-ansible-collection SUCCESS in 10m 39s
✔️ ansible-test-splitter SUCCESS in 6m 17s
✔️ integration-community.aws-1 SUCCESS in 12m 48s
Skipped 21 jobs

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/aa5b9cfcb1834c95b246c1a6fac582f0

ansible-galaxy-importer FAILURE in 5m 14s (non-voting)
✔️ build-ansible-collection SUCCESS in 10m 39s
✔️ ansible-test-splitter SUCCESS in 4m 25s
✔️ integration-community.aws-1 SUCCESS in 16m 31s
Skipped 21 jobs

plugins/modules/autoscaling_instance_refresh.py Outdated Show resolved Hide resolved
plugins/modules/autoscaling_instance_refresh.py Outdated Show resolved Hide resolved
plugins/modules/autoscaling_instance_refresh.py Outdated Show resolved Hide resolved
plugins/modules/autoscaling_instance_refresh.py Outdated Show resolved Hide resolved
plugins/modules/autoscaling_instance_refresh.py Outdated Show resolved Hide resolved
plugins/modules/autoscaling_instance_refresh.py Outdated Show resolved Hide resolved
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/7569f12c7f5949c890bfe1086e7c2209

✔️ ansible-galaxy-importer SUCCESS in 3m 26s (non-voting)
✔️ build-ansible-collection SUCCESS in 10m 41s
✔️ ansible-test-splitter SUCCESS in 4m 20s
✔️ integration-community.aws-1 SUCCESS in 16m 34s
Skipped 21 jobs

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/b9e4a79751a54146887c1029cd11ae82

ansible-galaxy-importer FAILURE in 4m 49s (non-voting)
✔️ build-ansible-collection SUCCESS in 10m 43s
✔️ ansible-test-splitter SUCCESS in 4m 20s
✔️ integration-community.aws-1 SUCCESS in 19m 31s
Skipped 21 jobs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update the documentation to use consistently M(...), O(...) and V(...)?

type: int
sample: 5
instance_refreshes:
description: Details of the instance refreshes for the Auto Scaling group..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Details of the instance refreshes for the Auto Scaling group..
description: Details of the instance refreshes for the Auto Scaling group.

type: complex
contains:
instance_refresh_id:
description: instance refresh id.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: instance refresh id.
description: Instance refresh id.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update the documentation to use consistently M(...), O(...) and V(...)?

- name: Assert that the correct number of records are returned
assert:
that:
- output | community.general.json_query(inst_refresh_id_json_query) | unique | length == 7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please replace community.general.json_query and use the json filter instead? We may want to limit dependencies on other collections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants