Is there a way to get ProvisioningArtifactParameters in order specified in the CloudFormation template?

Viewed 53

I am using AWS API(version 2015-12-10, javascript) to fetch Service Catalog products. describeProvisioningParameters method returns an object with ProvisioningArtifactParameters field which contains parameters, but these parameters sorted in a way different from the way provided in the CloudFormation template.

Parameters part of CloudFormation template:

{
    "Parameters": {
        "DBInputCIDR": {
            
        },
        "DBName": {
            
        },
        "DBPortNumber": {

        },
        "DBMasterUsername": {

        },
        "DBMasterUserPassword": {
        
        },
        "DBBackupRetentionPeriod": {
            
        },
        "DBAllocatedStorage": {
        
        },
        "DBEngineVersion": {
        
        },
        "DBInstanceClass": {
            
        },
        "MultiAZ": {
           
        }
    }
}

Parameters part of API response:

{
    "ProvisioningArtifactParameters": [
        {
            "ParameterKey": "DBBackupRetentionPeriod"
        },
        {
            "ParameterKey": "DBEngineVersion"
        },
        {
            "ParameterKey": "DBPortNumber"
        },
        {
            "ParameterKey": "DBAllocatedStorage"
        },
        {
            "ParameterKey": "DBMasterUserPassword"
        },
        {
            "ParameterKey": "DBInstanceClass"
        },
        {
            "ParameterKey": "DBInputCIDR"
        },
        {
            "ParameterKey": "DBMasterUsername"
        },
        {
            "ParameterKey": "DBName"
        },
        {
            "ParameterKey": "MultiAZ"
        }
    ]
}

Is there any way to sort API response as specified in CloudFormation template?

0 Answers
Related