Amazon web services 通过AWS CLI获取cloudformation堆栈的JSON模板

Amazon web services 通过AWS CLI获取cloudformation堆栈的JSON模板,amazon-web-services,amazon-cloudformation,aws-cli,Amazon Web Services,Amazon Cloudformation,Aws Cli,当我跑步时: (AWS CLI) aws——概要文件dev cloudformation描述堆栈——堆栈名称foo——输出json 我得到: { "Stacks": [ { "StackId": "arn:aws:cloudformation:foo_region:fooaccid:stack/foo/foo", "DriftInformation": { "StackDriftStatu

当我跑步时:

(AWS CLI)

aws——概要文件dev cloudformation描述堆栈——堆栈名称foo——输出json

我得到:


{
    "Stacks": [
        {
            "StackId": "arn:aws:cloudformation:foo_region:fooaccid:stack/foo/foo", 
            "DriftInformation": {
                "StackDriftStatus": "NOT_CHECKED"
            }, 
            "Description": "foo description", 
            "Parameters": [
                {
                    "ParameterValue": "foovalue", 
                    "ParameterKey": "fookey"
                }, 
                {
                    "ParameterValue": "foovalue2", 
                    "ParameterKey": "fookey2"
                }, 
            ], 
            "Tags": [], 
            "EnableTerminationProtection": false, 
            "CreationTime": "2020-01-07T23:58:57.747Z", 
            "Capabilities": [
                "CAPABILITY_NAMED_IAM"
            ], 
            "StackName": "fooname", 
            "NotificationARNs": [], 
            "StackStatus": "CREATE_COMPLETE", 
            "DisableRollback": false, 
            "RollbackConfiguration": {
                "RollbackTriggers": []
            }
        }
    ]
}
请注意,我没有返回堆栈的实际JSON模板(即堆栈的实际代码)

有没有办法通过AWS CLI获取此信息?


谢谢你的快速回答!
aws --profile dev cloudformation get-template --stack-name foo