ALIYUN::DataLakeFormation::Permissions

ALIYUN::DataLakeFormation::Permissions类型用于批量授权。

语法

{
  "Type": "ALIYUN::DataLakeFormation::Permissions",
  "Properties": {
    "CatalogId": String,
    "Permissions": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

CatalogId

String

数据目录ID。

Permissions

List

权限列表。

更多信息,请参考Permissions属性。

Permissions语法

"Permissions": [
  {
    "Access": String,
    "ResourceType": String,
    "Principal": String
  }
]

Permissions属性

属性名称

类型

必须

允许更新

描述

约束

Access

String

访问类型。

取值:

  • ALL

  • GRANT

  • CREATEDATABASE

  • ALTER

  • DROP

  • UPDATE

  • SELECT

  • DESCRIBE

  • LIST

  • CREATETABLE

Principal

String

用户资源描述符。

ResourceType

String

权限资源类型。

取值:

  • CATALOG

  • CATALOG_ALL

返回值

Fn::GetAtt

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Permissions:
    AssociationPropertyMetadata:
      Parameters:
        Access:
          Type: String
          Description:
            en: The access action of the granted permission.
          AllowedValues:
            - ALL
            - GRANT
            - CREATEDATABASE
            - ALTER
            - DROP
            - UPDATE
            - SELECT
            - DESCRIBE
            - LIST
            - CREATETABLE
          Required: true
        ResourceType:
          Type: String
          Description:
            en: The resource type of the granted permission.
          AllowedValues:
            - CATALOG
            - CATALOG_ALL
          Required: true
        Principal:
          Type: String
          Description:
            en: The role of the granted permissions.
          Required: true
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The permissions list.
    Required: true
    MinLength: 1
    MaxLength: 10
  CatalogId:
    Type: String
    Description:
      en: The catalog id.
    Required: true
Resources:
  DataLakeFormationPermissions:
    Type: ALIYUN::DataLakeFormation::Permissions
    Properties:
      Permissions:
        Ref: Permissions
      CatalogId:
        Ref: CatalogId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Permissions": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Access": {
            "Type": "String",
            "Description": {
              "en": "The access action of the granted permission."
            },
            "AllowedValues": [
              "ALL",
              "GRANT",
              "CREATEDATABASE",
              "ALTER",
              "DROP",
              "UPDATE",
              "SELECT",
              "DESCRIBE",
              "LIST",
              "CREATETABLE"
            ],
            "Required": true
          },
          "ResourceType": {
            "Type": "String",
            "Description": {
              "en": "The resource type of the granted permission."
            },
            "AllowedValues": [
              "CATALOG",
              "CATALOG_ALL"
            ],
            "Required": true
          },
          "Principal": {
            "Type": "String",
            "Description": {
              "en": "The role of the granted permissions."
            },
            "Required": true
          }
        }
      },
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The permissions list."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 10
    },
    "CatalogId": {
      "Type": "String",
      "Description": {
        "en": "The catalog id."
      },
      "Required": true
    }
  },
  "Resources": {
    "DataLakeFormationPermissions": {
      "Type": "ALIYUN::DataLakeFormation::Permissions",
      "Properties": {
        "Permissions": {
          "Ref": "Permissions"
        },
        "CatalogId": {
          "Ref": "CatalogId"
        }
      }
    }
  }
}