Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Good day: I'm trying to set CE blueprints but I'm having difficulties doing it. Can you show me the proper syntax for setting it? #14

Open
hakenmt opened this issue Sep 16, 2020 · 8 comments

Comments

@hakenmt
Copy link
Contributor

hakenmt commented Sep 16, 2020

Good day: I'm trying to set CE blueprints but I'm having difficulties doing it. Can you show me the proper syntax for setting it?
Below is my statement/error:

set-ceblueprint -instanceid 35a1773e-3acb-471d-af7c-723facaxe9b -InstanceType "t2.micro"
Set-CEBlueprint : Cannot retrieve the dynamic parameters for the cmdlet. The cloud environment 6849e59c-29f5-4e10-a459-9d8584c7524b is not supported by this cmdlet yet.
At line:1 char:1

  • set-ceblueprint -instanceid 35a1773e-3acb-471d-af7c-723facaxe95b -Ins ...
  •   + CategoryInfo          : InvalidArgument: (:) [Set-CEBlueprint], ParameterBindingException
      + FullyQualifiedErrorId : GetDynamicParametersException,Set-CEBlueprint
    
    

Originally posted by @aspersram in #7 (comment)

@hakenmt
Copy link
Contributor Author

hakenmt commented Sep 16, 2020

What version of the PowerShell module are you using? This was a problem after CloudEndure updated a number of their APIs and the data formats that got returned. This should be fixed in the most recent version, but want to confirm which one you're using @aspersram.

@aspersram
Copy link

Name Value


PSVersion 5.1.19041.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@hakenmt
Copy link
Contributor Author

hakenmt commented Sep 16, 2020

Looking for the version of the module, something like Get-Module CloudEndure.

@aspersram
Copy link

I think I found the issue: I was manually installing the new module but when I ran the set-ceblueprint cmdlet, it was loading the old module. I've uninstalled the old one (as opposed to removing it) and installed the new one. However, if I run the same cmd, here's the err:
set-ceblueprint -instanceid 35a1773e-3acb-471d-af7c-723facaxe95b -instanceType "t2.micro"
Set-CEBlueprint : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1

  • set-ceblueprint -instanceid 35a1773e-3acb-471d-af7c-723facaxe95b -ins ...
  •   + CategoryInfo          : InvalidArgument: (:) [Set-CEBlueprint], ParameterBindingException
      + FullyQualifiedErrorId : AmbiguousParameterSet,Set-CEBlueprint
    

@aspersram
Copy link

Also tried setting another property via hashtable:

Set-CEBlueprint -InstanceId 35a1773e-3acb-471d-af7c-723facaxe95b -Blueprint @{"runAfterLaunch" = "false"}

Update Blueprint
Are you sure you want to update the blueprint configuration?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
There was an issue updating the blueprint: 422 : UNPROCESSABLE ENTITY The remote server returned an error: (422) UNPROCESSABLE ENTITY.
At C:\temp\cloudendure-master\cloudendure\CloudEndure.psm1:2829 char:5

  • ... throw "There was an issue updating the blueprint: $($_.Ex ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (There was an is...SABLE ENTITY.
      :String) [], RuntimeException
    • FullyQualifiedErrorId : There was an issue updating the blueprint: 422 : UNPROCESSABLE ENTITY The remote server returned an error: (422) UNPROCESSABLE ENTITY.

@aspersram
Copy link

ModuleType Version Name ExportedCommands


Script 2.0.0 cloudendure {Add-CEUserRoles, Add-CEUserToProject, Get-CEAccount, Get-CEAccountExtendedInfo...}

@hakenmt
Copy link
Contributor Author

hakenmt commented Sep 16, 2020

ok, i'll need to debug that error from CE, it typically happens when the input doesn't exactly match their expected set of parameters, which aren't documented. On the first issue, it's a parameter set problem, it should be using the default parameter set, so I'll need to make an update to fix it.

@aspersram
Copy link

My end goal is to throw the full blueprint at the set-ceblueprint cmdlet. Here's an example of the hashtable I want to apply:

Name Value


staticIpAction DONT_CREATE
id 41e4df5b-6c27-4f81-b3a6-3fc6abdbckh6
publicIPAction ALLOCATE
runAfterLaunch False
subnetsHostProject
tags {System.Collections.Hashtable, System.Collections.Hashtable}
securityGroupIDs {sg-038cd941a4alb51f8}
region a43ee8c1-878f-4a28-9338-9f99bdd00aaa
privateIPAction CREATE_NEW
placementGroup
recommendedPrivateIP 10.10.26.35
machineId 35a1773e-3acb-411d-af7c-723facaee95b
staticIp
dedicatedHostIdentifier AUTO_PLACEMENT
disks {System.Collections.Hashtable}
iamRole AmazonSSMRoleForInstancesQuickSetup
privateIPs {}
byolOnDedicatedInstance False
networkInterface
subnetIDs {subnet-00f136c84a8b27f48}
tenancy SHARED
instanceType c5.xlarge
recommendedInstanceType c4.2xlarge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants