Closed indented-automation closed 2 years ago
This does not work directly for a few reasons.
Get-EC2IBComponentList
returns an array of ComponentVersion objects (per the ListComponents API).Get-EC2IBComponent
takes an input of a "ComponentBuildVersionArn" (as you can see in the GetComponent API reference.To do this today, your best bet is to use the -Select
parameter across a few cmdlets:
Get-EC2IBComponentList -Select ComponentVersionList.Arn |
Get-EC2IBComponentBuildVersionList -Select ComponentSummaryList.Arn |
Get-EC2IBComponent
For the SDK team - could we add an alias to these parameters to accept Arn
?
Eg,
Get-EC2IBComponentBuildVersionList -> "ComponentVersionArn" accepts an alias of "Arn"
Get-EC2IBComponent -> "ComponentBuildVersionArn" accepts an alias of "Arn"
This should enable:
Get-EC2IBComponentList | Get-EC2IBComponentBuildVersionList | Get-EC2IBComponent
Hi @indented-automation,
Please confirm if the inputs provided above work for you.
Thanks, Ashish
As with the related issue.
This works, but it's counter-intuitive and not user-friendly.
Chris
On Fri, 24 Jul 2020 at 01:15, ashishdhingra notifications@github.com wrote:
Hi @indented-automation https://github.com/indented-automation,
Please confirm if the inputs provided above work for you.
Thanks, Ashish
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aws/aws-tools-for-powershell/issues/152#issuecomment-663293126, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADB3UDX5K25OABU5QDTK2G3R5DHCFANCNFSM4MQB5AIA .
We have noticed this issue has not recieved attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.
It should be possible to pipe from Get-EC2IBComponentList to Get-EC2IBComponent.
Expected Behavior
The pipeline should correctly provide a value for the ARN needed by Get-EC2IBComponent.
Current Behavior
As the ComponentBuildVersionArn is suffixed with a numeric value
Get-EC2IBComponentList
cannot be effectively used to find the required ARN for a component. The trailing value must be guessed.Steps to Reproduce (for bugs)
Throws the error:
Please note that this command is also affected by the bug in #150
Context
Trying to manage EC2 Image Builder configuration in code.
Your Environment