ALIYUN::CloudSiem::UserSourceLogConfig类型用于添加日志接入。
语法
{
  "Type": "ALIYUN::CloudSiem::UserSourceLogConfig",
  "Properties": {
    "SourceProdCode": String,
    "SubUserId": String,
    "SourceLogInfo": Map,
    "SourceLogCode": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| SourceProdCode | String | 是 | 否 | 产品 code。 | 查看对应具体信息可以根据ListAllProds - 查看云产品列表 API调用结果。 | 
| SubUserId | String | 是 | 否 | 需要接入日志的阿里云账号 ID。 | 无 | 
| SourceLogInfo | Map | 是 | 否 | 需要接入日志的详细 SLS 信息 | 更多信息,请参考SourceLogInfo属性。 | 
| SourceLogCode | String | 是 | 否 | 日志 code。 | 查看对应具体信息可以根据ListImportedLogsByProd - 查看该产品下日志接入详情 API调用结果。 | 
SourceLogInfo语法
"SourceLogInfo": {
  "Project": String,
  "RegionCode": String,
  "LogStore": String
}SourceLogInfo属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| LogStore | String | 是 | 否 | LogStore名称。 | 无 | 
| Project | String | 是 | 否 | 日志项目名称。 | 无 | 
| RegionCode | String | 是 | 否 | 日志所属的地域。 | 无 | 
返回值
Fn::GetAtt
无
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SourceLogCode:
    Description:
      en: The source log code. For all available log codes of a product, query the
        Cloud Siem ListImportedLogsByProd API with a specific product code.
    Required: true
    Type: String
  SourceLogInfo:
    AssociationPropertyMetadata:
      Parameters:
        LogStore:
          Description:
            en: The logstore name.
          Required: true
          Type: String
        Project:
          Description:
            en: The log project name
          Required: true
          Type: String
        RegionCode:
          Description:
            en: The region of the log
          Required: true
          Type: String
    Description:
      en: The info of log to be added.
    Required: true
    Type: Json
  SourceProdCode:
    Description:
      en: The product code. For all available product codes, query the Cloud Siem
        ListAllProds API.
    Required: true
    Type: String
  SubUserId:
    Description:
      en: The Id of the account to be submitted.
    Required: true
    Type: String
Resources:
  UserSourceLogConfig:
    Properties:
      SourceLogCode:
        Ref: SourceLogCode
      SourceLogInfo:
        Ref: SourceLogInfo
      SourceProdCode:
        Ref: SourceProdCode
      SubUserId:
        Ref: SubUserId
    Type: ALIYUN::CloudSiem::UserSourceLogConfig
                        {
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SourceProdCode": {
      "Type": "String",
      "Description": {
        "en": "The product code. For all available product codes, query the Cloud Siem ListAllProds API."
      },
      "Required": true
    },
    "SubUserId": {
      "Type": "String",
      "Description": {
        "en": "The Id of the account to be submitted."
      },
      "Required": true
    },
    "SourceLogInfo": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Project": {
            "Type": "String",
            "Description": {
              "en": "The log project name"
            },
            "Required": true
          },
          "RegionCode": {
            "Type": "String",
            "Description": {
              "en": "The region of the log"
            },
            "Required": true
          },
          "LogStore": {
            "Type": "String",
            "Description": {
              "en": "The logstore name."
            },
            "Required": true
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The info of log to be added."
      },
      "Required": true
    },
    "SourceLogCode": {
      "Type": "String",
      "Description": {
        "en": "The source log code. For all available log codes of a product, query the Cloud Siem ListImportedLogsByProd API with a specific product code."
      },
      "Required": true
    }
  },
  "Resources": {
    "UserSourceLogConfig": {
      "Type": "ALIYUN::CloudSiem::UserSourceLogConfig",
      "Properties": {
        "SourceProdCode": {
          "Ref": "SourceProdCode"
        },
        "SubUserId": {
          "Ref": "SubUserId"
        },
        "SourceLogInfo": {
          "Ref": "SourceLogInfo"
        },
        "SourceLogCode": {
          "Ref": "SourceLogCode"
        }
      }
    }
  }
}
                        该文章对您有帮助吗?