ROSTemplateFormatVersion: '2015-09-01'
Description:
  zh-cn: 创建OSS存储桶与SLS审计，实现日志安全审计及合规性评估，确保数据访问合规。
  en: Create OSS buckets and implement SLS (Log Service) auditing to achieve secure
    log auditing and compliance assessment, ensuring compliant data access.
Parameters:
  BucketName:
    Type: String
    Label:
      en: Bucket Name
      zh-cn: 存储空间名称
    Description:
      en: The name must be 3 to 63 bytes in length, The name must start and end with a lowercase letter or digit.The name can contain only lowercase letters, digits, and hyphens (-).;<br><b>note：<font color='blue'>A bucket name must be globally unique within OSS. Bucket names cannot be changed after the bucket is created.</b></font>
      zh-cn: 长度为3~63个字符，必须以小写字母或数字开头和结尾，可以包含小写字母、数字和连字符(-);<br><b>注：<font color='blue'>需要全网唯一性，已经存在的不能在创建。</b></font>
    AssociationProperty: AutoCompleteInput
    AssociationPropertyMetadata:
      Length: 6
      Prefix: test-example-
      CharacterClasses:
        - Class: lowercase
          min: 1
Resources:
  AutoEnableOSS:
    Type: ALIYUN::ROS::AutoEnableService
    Properties:
      ServiceName: OSS
  AutoEnableSLS:
    Type: ALIYUN::ROS::AutoEnableService
    Properties:
      ServiceName: SLS
  OssBucket:
    Type: ALIYUN::OSS::Bucket
    DependsOn: AutoEnableOSS
    Properties:
      BucketName:
        Ref: BucketName
      DeletionForce: true
      AccessControl: public-read
  SLSAudit:
    Type: ALIYUN::SLS::Audit
    DependsOn: AutoEnableSLS
    Properties:
      DisplayName:
        Ref: ALIYUN::StackName
      VariableMap:
        ActiontrailEnabled: true
        OssAccessEnabled: true
        OssMeteringEnabled: true
Outputs:
  BucketName:
    Description: Oss Bucket Name
    Value:
      Ref: OssBucket
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Parameters:
          - BucketName
    TemplateTags:
      - acs:technical-solution:log-security-audit-and-compliance-assessment:日志安全审计与合规性评估-tech_solu_148
