aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.59k stars 1.55k forks source link

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

Closed svalio closed 4 years ago

svalio commented 4 years ago

Confirm by changing [ ] to [x] below:

Describe the question

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 the CloudFormation template?

ajredniwja commented 4 years ago

This is a feature request for the serviceCatalog team, closing this in favor of #3416

Reached out to the the team to convey the feature request.