ALIYUN::DataWorks::DataSourceSharedRule类型用于创建数据源分享规则。
语法
{
"Type": "ALIYUN::DataWorks::DataSourceSharedRule",
"Properties": {
"DataSourceId": Integer,
"EnvType": String,
"TargetProjectId": Integer,
"SharedUser": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
DataSourceId |
Integer |
是 |
否 |
数据源 ID,即数据源的唯一标识符。 |
无 |
|
EnvType |
String |
是 |
否 |
数据源共享到目标项目的环境类型。 |
取值:
|
|
TargetProjectId |
Integer |
是 |
否 |
数据源共享目标项目的 ID。 |
无 |
|
SharedUser |
String |
否 |
否 |
数据源权限策略的目标用户。 |
为空时表示共享给项目。 |
返回值
Fn::GetAtt
-
SharedDataSourceName:共享到目标空间的数据源名称,由源空间名称和数据源名称组成,以点号分隔。
-
CreateTime:数据源共享规则的创建时间。
-
SharedUser:数据源权限策略的目标用户,为空时表示共享给项目。
-
CreateUser:数据源权限策略的创建者。
-
TargetProjectId:数据源共享目标项目的 ID。
-
SourceProjectId:数据源原始创建所在项目的 ID。
-
DataSourceSharedRuleId:数据源共享规则 ID,即数据源共享规则的唯一标识符。
-
EnvType:数据源共享到目标项目的环境类型,如 Dev(开发环境)和 Prod(生产环境)。
-
DataSourceId:数据源 ID,即数据源的唯一标识符。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DataSourceId:
Description:
en: The ID of the data source, that is, the unique identifier of the data source.
Required: true
Type: Number
EnvType:
AllowedValues:
- Dev
- Prod
Description:
en: The environment type of the data source shared to the target project, such
as Dev (Development Environment) and Prod (production environment).
Required: true
Type: String
SharedUser:
Description:
en: The target user of the data source permission policy, which is null to share
to the project.
Required: false
Type: String
TargetProjectId:
Description:
en: The ID of the project to which the data source is shared.
Required: true
Type: Number
Resources:
ExtensionResource:
Properties:
DataSourceId:
Ref: DataSourceId
EnvType:
Ref: EnvType
SharedUser:
Ref: SharedUser
TargetProjectId:
Ref: TargetProjectId
Type: ALIYUN::DataWorks::DataSourceSharedRule
Outputs:
CreateTime:
Description: The creation time of the data source sharing rule.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
CreateUser:
Description: Creator of the data source permission policy.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateUser
DataSourceId:
Description: The ID of the data source, that is, the unique identifier of the
data source.
Value:
Fn::GetAtt:
- ExtensionResource
- DataSourceId
DataSourceSharedRuleId:
Description: The data source sharing rule ID, that is, the unique identifier of
the data source sharing rule.
Value:
Fn::GetAtt:
- ExtensionResource
- DataSourceSharedRuleId
EnvType:
Description: The environment type of the data source shared to the target project,
such as Dev (Development Environment) and Prod (production environment).
Value:
Fn::GetAtt:
- ExtensionResource
- EnvType
SharedDataSourceName:
Description: The name of the data source shared to the target space. Consists
of the name of the source space and the name of the data source, separated by
dots.
Value:
Fn::GetAtt:
- ExtensionResource
- SharedDataSourceName
SharedUser:
Description: The target user of the data source permission policy, which is null
to share to the project.
Value:
Fn::GetAtt:
- ExtensionResource
- SharedUser
SourceProjectId:
Description: The ID of the project to which the data source is originally created.
Value:
Fn::GetAtt:
- ExtensionResource
- SourceProjectId
TargetProjectId:
Description: The ID of the project to which the data source is shared.
Value:
Fn::GetAtt:
- ExtensionResource
- TargetProjectId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SharedUser": {
"Type": "String",
"Description": {
"en": "The target user of the data source permission policy, which is null to share to the project."
},
"Required": false
},
"TargetProjectId": {
"Type": "Number",
"Description": {
"en": "The ID of the project to which the data source is shared."
},
"Required": true
},
"EnvType": {
"Type": "String",
"Description": {
"en": "The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment)."
},
"AllowedValues": [
"Dev",
"Prod"
],
"Required": true
},
"DataSourceId": {
"Type": "Number",
"Description": {
"en": "The ID of the data source, that is, the unique identifier of the data source."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::DataWorks::DataSourceSharedRule",
"Properties": {
"SharedUser": {
"Ref": "SharedUser"
},
"TargetProjectId": {
"Ref": "TargetProjectId"
},
"EnvType": {
"Ref": "EnvType"
},
"DataSourceId": {
"Ref": "DataSourceId"
}
}
}
},
"Outputs": {
"SharedDataSourceName": {
"Description": "The name of the data source shared to the target space. Consists of the name of the source space and the name of the data source, separated by dots.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SharedDataSourceName"
]
}
},
"CreateTime": {
"Description": "The creation time of the data source sharing rule.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
},
"SharedUser": {
"Description": "The target user of the data source permission policy, which is null to share to the project.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SharedUser"
]
}
},
"CreateUser": {
"Description": "Creator of the data source permission policy.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateUser"
]
}
},
"TargetProjectId": {
"Description": "The ID of the project to which the data source is shared.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TargetProjectId"
]
}
},
"SourceProjectId": {
"Description": "The ID of the project to which the data source is originally created.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SourceProjectId"
]
}
},
"DataSourceSharedRuleId": {
"Description": "The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DataSourceSharedRuleId"
]
}
},
"EnvType": {
"Description": "The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvType"
]
}
},
"DataSourceId": {
"Description": "The ID of the data source, that is, the unique identifier of the data source.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DataSourceId"
]
}
}
}
}
该文章对您有帮助吗?