Closed muthu329024 closed 4 years ago
I'm not able to use "Write-ECSClusterCapacityProvider" to update --default-capacity-provider-strategy using powershell
> Write-ECSClusterCapacityProvider -Cluster test-cluster -CapacityProvider test-CapacityProvider -DefaultCapacityProvider Strategy capacityProvider=test-CapacityProvider,weight=1,base= Write-ECSClusterCapacityProvider : Cannot bind parameter 'DefaultCapacityProviderStrategy'. Cannot convert the "capacityProvider=test-CapacityProvider" value of type "System.String" to type "Amazon.ECS.Model.CapacityProviderStrategyItem". At line:1 char:130 + ... roviderStrategy capacityProvider=test-CapacityProvider,weight=1,base= + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Write-ECSClusterCapacityProvider], ParameterBindingException + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Amazon.PowerShell.Cmdlets.ECS.WriteECSClusterCapacityProviderCmdlet
Able to execute with AWS CLI without any issue
> aws ecs put-cluster-capacity-providers --cluster test-cluster --capacity-providers test-CapacityProvider --default-capacity-provider-strategy capacityProvider=test-CapacityProvider,weight=1,base=1 { "cluster": { ....
Got it ...
Write-ECSClusterCapacityProvider -Cluster test-cluster -CapacityProvider test-CapacityProvider -DefaultCapacityProviderStrategy @{capacityProvider="test-CapacityProvider";weight=1;base=1}
I'm not able to use "Write-ECSClusterCapacityProvider" to update --default-capacity-provider-strategy using powershell
Able to execute with AWS CLI without any issue