All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::DFS::AccessRule

Last Updated:Aug 12, 2024

ALIYUN::DFS::AccessRule is used to create a rule for a permission group.

Syntax

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

Properties

PropertyTypeRequiredEditableDescriptionConstraint
DescriptionStringNoYesThe description of the rule. None.
PriorityNumberNoYesThe priority of the rule. If an authorized object matches multiple rules, the rule with the highest priority takes effect.

Valid values: 1 to 100. The value 1 indicates the highest priority.

NetworkSegmentStringYesYesThe IP address or CIDR block of the authorized object. None.
AccessGroupIdStringYesNoThe ID of the permission group. None.
RWAccessTypeStringYesYesThe permissions that you want to grant to the authorized object to access the file system. Valid values:
  • RDWR: read and write permissions
  • RDONLY: read-only permissions

Return values

Fn::GetAtt

AccessRuleId: the ID of the rule.

Examples

  • 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