ALIYUN::PaiFeatureStore::Datasource

更新时间:
复制 MD 格式

ALIYUN::PaiFeatureStore::Datasource类型用于创建数据源。

语法

{
  "Type": "ALIYUN::PaiFeatureStore::Datasource",
  "Properties": {
    "DatasourceName": String,
    "InstanceId": String,
    "Type": String,
    "Uri": String,
    "WorkspaceId": String,
    "Config": Map
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DatasourceName

String

数据源名称。

以字母或数字开头,仅包含字母、数字和下划线,最大长度不超过 63 个字符。

InstanceId

String

FeatureStore 实例 ID。

Type

String

数据源类型,

取值:

  • Hologres

  • GraphCompute

  • FeatureDB

  • MaxCompute

Uri

String

数据源的资源地址。

最大长度不超过 64 个字符。

WorkspaceId

String

PAI 工作空间 ID。

Config

Map

资源配置信息。

返回值

Fn::GetAtt

  • Type:数据源类型。

  • DatasourceName:数据源名称,以字母或数字开头,仅包含字母、数字和下划线,最大长度不超过 63 个字符。

  • DatasourceId:数据源 ID。

  • Config:资源配置信息,字符串格式为 JSON。

  • CreateTime:资源的创建时间。

  • WorkspaceId:PAI 工作空间 ID,可通过 ListWorkspaces 接口获取。

  • Uri:数据源的资源地址,最大长度不超过 64 个字符。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Config:
    Description:
      en: Resource configuration information. The string format is json.
    Required: false
    Type: Json
  DatasourceName:
    Description:
      en: The datasource name. Start with a letter or number and contain only letters,
        numbers, and underscores. The maximum length cannot exceed 63.
    Required: true
    Type: String
  InstanceId:
    Description:
      en: The ID of FeatureStore instance, which can be obtained through the ListInstances
        interface.
    Required: true
    Type: String
  Type:
    AllowedValues:
      - Hologres
      - GraphCompute
      - FeatureDB
      - MaxCompute
    Description:
      en: 'Data source type. The value is as follows:

        *  Hologres

        *  GraphCompute

        *  FeatureDB

        *  MaxCompute.'
    Required: true
    Type: String
  Uri:
    Description:
      en: The resource address of the datasource. The maximum length cannot exceed
        64.
    Required: true
    Type: String
  WorkspaceId:
    Description:
      en: PAI workspace ID, which can be obtained through the ListWorkspaces interface.
    Required: true
    Type: String
Resources:
  ExtensionResource:
    Properties:
      Config:
        Ref: Config
      DatasourceName:
        Ref: DatasourceName
      InstanceId:
        Ref: InstanceId
      Type:
        Ref: Type
      Uri:
        Ref: Uri
      WorkspaceId:
        Ref: WorkspaceId
    Type: ALIYUN::PaiFeatureStore::Datasource
Outputs:
  Config:
    Description: Resource configuration information. The string format is json.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Config
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  DatasourceId:
    Description: The first ID of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DatasourceId
  DatasourceName:
    Description: The datasource name. Start with a letter or number and contain only
      letters, numbers, and underscores. The maximum length cannot exceed 63.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DatasourceName
  Type:
    Description: Data source type.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Type
  Uri:
    Description: The resource address of the datasource. The maximum length cannot
      exceed 64.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Uri
  WorkspaceId:
    Description: PAI workspace ID, which can be obtained through the ListWorkspaces
      interface.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - WorkspaceId
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Type": {
      "Type": "String",
      "Description": {
        "en": "Data source type. The value is as follows:\n*  Hologres\n*  GraphCompute\n*  FeatureDB\n*  MaxCompute."
      },
      "AllowedValues": [
        "Hologres",
        "GraphCompute",
        "FeatureDB",
        "MaxCompute"
      ],
      "Required": true
    },
    "DatasourceName": {
      "Type": "String",
      "Description": {
        "en": "The datasource name. Start with a letter or number and contain only letters, numbers, and underscores. The maximum length cannot exceed 63."
      },
      "Required": true
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of FeatureStore instance, which can be obtained through the ListInstances interface."
      },
      "Required": true
    },
    "Config": {
      "Type": "Json",
      "Description": {
        "en": "Resource configuration information. The string format is json."
      },
      "Required": false
    },
    "WorkspaceId": {
      "Type": "String",
      "Description": {
        "en": "PAI workspace ID, which can be obtained through the ListWorkspaces interface."
      },
      "Required": true
    },
    "Uri": {
      "Type": "String",
      "Description": {
        "en": "The resource address of the datasource. The maximum length cannot exceed 64."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::PaiFeatureStore::Datasource",
      "Properties": {
        "Type": {
          "Ref": "Type"
        },
        "DatasourceName": {
          "Ref": "DatasourceName"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "Config": {
          "Ref": "Config"
        },
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        },
        "Uri": {
          "Ref": "Uri"
        }
      }
    }
  },
  "Outputs": {
    "Type": {
      "Description": "Data source type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Type"
        ]
      }
    },
    "DatasourceName": {
      "Description": "The datasource name. Start with a letter or number and contain only letters, numbers, and underscores. The maximum length cannot exceed 63.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DatasourceName"
        ]
      }
    },
    "DatasourceId": {
      "Description": "The first ID of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DatasourceId"
        ]
      }
    },
    "Config": {
      "Description": "Resource configuration information. The string format is json.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Config"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "WorkspaceId": {
      "Description": "PAI workspace ID, which can be obtained through the ListWorkspaces interface.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkspaceId"
        ]
      }
    },
    "Uri": {
      "Description": "The resource address of the datasource. The maximum length cannot exceed 64.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Uri"
        ]
      }
    }
  }
}