全部产品
Search
文档中心

Resource Orchestration Service:ALIYUN::DFS::AccessRule

更新时间:Jun 26, 2025

ALIYUN::DFS::AccessRule digunakan untuk membuat aturan dalam grup izin.

Sintaksis

{
  "Type": "ALIYUN::DFS::AccessRule",
  "Properties": {
    "Description": String,
    "Priority": Number,
    "NetworkSegment": String,
    "AccessGroupId": String,
    "RWAccessType": String
  }
}

Properti

PropertiTipeDiperlukanDapat DieditDeskripsiKendala
DescriptionStringTidakYaDeskripsi dari aturan tersebut. Tidak ada.
PriorityNumberTidakYaPrioritas dari aturan tersebut. Jika objek yang diizinkan cocok dengan beberapa aturan, aturan dengan prioritas tertinggi akan berlaku.

Nilai valid: 1 hingga 100. Nilai 1 menunjukkan prioritas tertinggi.

NetworkSegmentStringYaYaAlamat IP atau blok CIDR dari objek yang diizinkan. Tidak ada.
AccessGroupIdStringYaTidakID dari grup izin. Tidak ada.
RWAccessTypeStringYaYaIzin yang ingin Anda berikan kepada objek yang diizinkan untuk mengakses sistem file. Nilai valid:
  • RDWR: izin baca dan tulis
  • RDONLY: izin hanya-baca

Nilai pengembalian

Fn::GetAtt

AccessRuleId: ID dari aturan.

Contoh

  • JSON Format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "NetworkSegment": {
          "Type": "String",
          "Description": "The NetworkSegment of the Access Rule.",
          "MaxLength": 100
        },
        "AccessGroupId": {
          "Type": "String",
          "Description": "The resource ID of Access Group."
        },
        "RWAccessType": {
          "Type": "String",
          "Description": "The read/write permission of the authorized object on the file system.\nValues:\nRDWR (default) : read and write.\nRDONLY: read-only",
          "AllowedValues": [
            "RDWR",
            "RDONLY"
          ],
          "Default": "RDWR"
        }
      },
      "Resources": {
        "AccessRule": {
          "Type": "ALIYUN::DFS::AccessRule",
          "Properties": {
            "NetworkSegment": {
              "Ref": "NetworkSegment"
            },
            "AccessGroupId": {
              "Ref": "AccessGroupId"
            },
            "RWAccessType": {
              "Ref": "RWAccessType"
            }
          }
        }
      },
      "Outputs": {
        "AccessRuleId": {
          "Description": "The ID of the access_rule.",
          "Value": {
            "Fn::GetAtt": [
              "AccessRule",
              "AccessRuleId"
            ]
          }
        }
      }
    }
  • YAML Format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      NetworkSegment:
        Type: String
        Description: The NetworkSegment of the Access Rule.
        MaxLength: 100
      AccessGroupId:
        Type: String
        Description: The resource ID of Access Group.
      RWAccessType:
        Type: String
        Description: |-
          The read/write permission of the authorized object on the file system.
          Values:
          RDWR (default) : read and write.
          RDONLY: read-only
        AllowedValues:
          - RDWR
          - RDONLY
        Default: RDWR
    Resources:
      AccessRule:
        Type: ALIYUN::DFS::AccessRule
        Properties:
          NetworkSegment:
            Ref: NetworkSegment
          AccessGroupId:
            Ref: AccessGroupId
          RWAccessType:
            Ref: RWAccessType
    Outputs:
      AccessRuleId:
        Description: The ID of the access_rule.
        Value:
          Fn::GetAtt:
            - AccessRule
            - AccessRuleId