阿里云RAM对OSS某一目录进行访问控制

只能访问OSS的fmy-java-game-res-x03/fmy-web/images/mhyd/*下所有文件。

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "oss:*"
      ],
      "Resource": [
        "acs:oss:*:*:fmy-java-game-res-x03/fmy-web/images/mhyd/*"
      ],
      "Condition": {}
    },
    {
      "Effect": "Allow",
      "Action": [
        "oss:ListObjects"
      ],
      "Resource": [
        "acs:oss:*:*:fmy-java-game-res-x03"
      ],
      "Condition": {
        "StringLike": {
          "oss:Prefix": [
            "",
            "fmy-web/",
            "fmy-web/images/",
            "fmy-web/images/mhyd/*"
          ]
        },
        "StringEquals": {
          "oss:Delimiter": "/"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "oss:ListBuckets"
      ],
      "Resource": [
        "acs:oss:*:*:*"
      ],
      "Condition": {}
    }
  ]
}

 

你可能感兴趣的:(阿里云SDK使用笔记)