全部產品
Search
文件中心

:ALIYUN::Config::CompliancePack

更新時間:Jul 03, 2024

ALIYUN::Config::CompliancePack類型用於建立合規包。

文法

{
  "Type": "ALIYUN::Config::CompliancePack",
  "Properties": {
    "CompliancePackName": String,
    "Description": String,
    "ConfigRules": String,
    "CompliancePackTemplateId": String,
    "RiskLevel": Integer,
    "ConfigRuleIds": List
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

CompliancePackName

String

合規包名稱。

Description

String

合規包描述資訊。

ConfigRules

String

配置規則列表。

CompliancePackTemplateId

String

合規包模板ID。

RiskLevel

Integer

風險等級。

取值:

  • 1:高風險。

  • 2:中風險。

  • 3:低風險。

ConfigRuleIds

List

規則ID列表。

更多資訊,請參見ConfigRuleIds屬性

ConfigRuleParameters文法

"ConfigRuleParameters": [
  {
    "ParameterValue": String,
    "Required": Boolean,
    "ParameterName": String
  }
]

ConfigRuleParameters屬性

屬性名稱

類型

必須

允許更新

描述

約束

ParameterValue

String

參數值。

Required

Boolean

參數是否必選。

取值:

  • true

  • false

ParameterName

String

參數名稱。

ConfigRuleIds文法

"ConfigRuleIds": [
    "ConfigRuleId": String
]

ConfigRuleIds屬性

屬性名稱

類型

必須

允許更新

描述

約束

ConfigRuleId

String

參數值。

傳回值

Fn::GetAtt

  • CompliancePackId:規則所屬的合規包ID。

  • Description:合規包描述。

  • CompliancePackName:合規包名稱。

  • AccountId:阿里雲帳號ID。

  • CompliancePackTemplateId:合規包模板ID。

  • RiskLevel:風險等級。

樣本

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CompliancePackName:
    Description: Compliance Package Name
    Type: String
  CompliancePackTemplateId:
    Description: Compliance Package Template Id
    Type: String
  ConfigRules:
    Description: Config Rule List
    Type: String
  Description:
    Description: Description
    Type: String
  RiskLevel:
    Description: Ris Level
    Type: Number
Resources:
  ConfigCompliancePack:
    Properties:
      CompliancePackName:
        Ref: CompliancePackName
      CompliancePackTemplateId:
        Ref: CompliancePackTemplateId
      ConfigRules:
        Ref: ConfigRules
      Description:
        Ref: Description
      RiskLevel:
        Ref: RiskLevel
    Type: ALIYUN::Config::CompliancePack
Outputs:
  AccountId:
    Description: Aliyun User Id
    Value:
      Fn::GetAtt:
      - ConfigCompliancePack
      - AccountId
  CompliancePackId:
    Description: Compliance Package ID
    Value:
      Fn::GetAtt:
      - ConfigCompliancePack
      - CompliancePackId
  CompliancePackName:
    Description: Compliance Package Name
    Value:
      Fn::GetAtt:
      - ConfigCompliancePack
      - CompliancePackName
  CompliancePackTemplateId:
    Description: Compliance Package Template Id
    Value:
      Fn::GetAtt:
      - ConfigCompliancePack
      - CompliancePackTemplateId
  Description:
    Description: Description
    Value:
      Fn::GetAtt:
      - ConfigCompliancePack
      - Description
  RiskLevel:
    Description: Ris Level
    Value:
      Fn::GetAtt:
      - ConfigCompliancePack
      - RiskLevel

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Description": {
      "Type": "String",
      "Description": "Description"
    },
    "CompliancePackName": {
      "Type": "String",
      "Description": "Compliance Package Name"
    },
    "ConfigRules": {
      "Type": "String",
      "Description": "Config Rule List"
    },
    "CompliancePackTemplateId": {
      "Type": "String",
      "Description": "Compliance Package Template Id"
    },
    "RiskLevel": {
      "Type": "Number",
      "Description": "Ris Level"
    }
  },
  "Resources": {
    "ConfigCompliancePack": {
      "Type": "ALIYUN::Config::CompliancePack",
      "Properties": {
        "Description": {
          "Ref": "Description"
        },
        "CompliancePackName": {
          "Ref": "CompliancePackName"
        },
        "ConfigRules": {
          "Ref": "ConfigRules"
        },
        "CompliancePackTemplateId": {
          "Ref": "CompliancePackTemplateId"
        },
        "RiskLevel": {
          "Ref": "RiskLevel"
        }
      }
    }
  },
  "Outputs": {
    "CompliancePackId": {
      "Description": "Compliance Package ID",
      "Value": {
        "Fn::GetAtt": [
          "ConfigCompliancePack",
          "CompliancePackId"
        ]
      }
    },
    "Description": {
      "Description": "Description",
      "Value": {
        "Fn::GetAtt": [
          "ConfigCompliancePack",
          "Description"
        ]
      }
    },
    "CompliancePackName": {
      "Description": "Compliance Package Name",
      "Value": {
        "Fn::GetAtt": [
          "ConfigCompliancePack",
          "CompliancePackName"
        ]
      }
    },
    "AccountId": {
      "Description": "Aliyun User Id",
      "Value": {
        "Fn::GetAtt": [
          "ConfigCompliancePack",
          "AccountId"
        ]
      }
    },
    "CompliancePackTemplateId": {
      "Description": "Compliance Package Template Id",
      "Value": {
        "Fn::GetAtt": [
          "ConfigCompliancePack",
          "CompliancePackTemplateId"
        ]
      }
    },
    "RiskLevel": {
      "Description": "Ris Level",
      "Value": {
        "Fn::GetAtt": [
          "ConfigCompliancePack",
          "RiskLevel"
        ]
      }
    }
  }
}