Open ScriptAutomate opened 3 years ago
Hi @ScriptAutomate,
Thanks for the feature request! I'll review with the team to get their thoughts.
Hi @ScriptAutomate,
Would you be able to elaborate further on your workflow/use-case for this? Thanks!
Definitely, @stobrien89!
Workflow that would be possible if this feature exists:
$ aws ec2 delete-volume --volume-id vol-049df61146c4d7901 --generate-cli-skeleton yaml-input > delete-volume.yaml
Now I have the following in delete-volume.yaml
:
VolumeId: 'vol-049df61146c4d7901' # [REQUIRED] The ID of the volume.
DryRun: true # Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.
Now I can later do something like this, without needing to fill the template out myself, to immediately test a DryRun of the template:
# This is DryRun by default, as shown in default template, and checks whether action can be done
$ aws ec2 delete-volume --cli-input-yaml delete-volume.yaml
I can then modify template to shift DryRun
to false
for when actually making use of the template, such as whether the action is a scheduled one to be done at a different time.
Hi @ScriptAutomate,
Thanks for clarifying. I reviewed this with the team the other day and we agreed that it seems like a good/useful idea. We'll see how much traction this gets and take it from there!
This looks like an error not a new feature? aws iam attach-group-policy --policy-arn arn:aws:iam::*:policy/orgs-assume-nnnnnn --group-name name_Orgs --generate-cli-skeleton output > temp.json got an empty file. https://docs.aws.amazon.com/cli/latest/reference/iam/attach-group-policy.html suggests otherwise. aws-cli/1.19.39
Hi @arnelator,
You need to set --generate-cli-skeleton input
:
aws iam attach-group-policy --generate-cli-skeleton input > temp.json
Note that providing other parameters does not stop the file from being generated, they just are not used (as suggested for this feature request).
is this still valid? would be a great feature to have 🚀
Is your feature request related to a problem? Please describe.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
I had followed the documentation for
aws.ec2.delete-volume
initially.Running the following command deletes an EBS volume:
Running the following, in prep for generating a yaml/json that can be consumed by
[--cli-input-json | --cli-input-yaml]
didn't do what I had expected:It turns out I had misunderstood the functionality of
--generate-cli-skeleton
, and that is will ignore the other args you are providing (unless this is a bug):It doesn't create pre-populated templates based on the args used.
Describe the solution you'd like
It would be excellent if it worked this way:
Describe alternatives you've considered
Provide some kind of error output or warning message that states other args have been ignored, or extend the documentation for
--generate-cli-skeleton
to be more clear about this current functionality.