ALIYUN::SLS::OssExternalStore类型用于创建OSS外部存储。
语法
{
"Type": "ALIYUN::SLS::OssExternalStore",
"Properties": {
"AccessId": String,
"AccessKey": String,
"Bucket": String,
"Columns": List,
"Endpoint": String,
"ExternalStoreName": String,
"Objects": List,
"Project": String,
"StoreType": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
AccessId | String | 是 | 是 | AccessKey ID。 | 无 |
AccessKey | String | 是 | 是 | AccessKey Secret。 | 无 |
Bucket | String | 是 | 是 | OSS Bucket 名称。 | 无 |
Columns | List | 是 | 是 | 关联的字段列表。 | 无 |
Endpoint | String | 是 | 是 | OSS 的 Endpoint 访问网址。 | 无 |
ExternalStoreName | String | 是 | 否 | 外部存储的名称。 | 无 |
Objects | List | 是 | 是 | 关联的 OSS 文件名称。 | 最多支持关联100个OSS文件。 |
Project | String | 是 | 否 | Project 名称。 | 无 |
StoreType | String | 是 | 否 | 外部存储的类型。 | 取值:
|
Columns语法
"Columns": [
{
"Type": String,
"Name": String
}
]
Columns属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Name | String | 是 | 是 | 字段名称。 | 无 |
Type | String | 是 | 是 | 字段类型。 | 取值:
|
返回值
Fn::GetAtt
Project:Project 名称。
ExternalStoreName:外部存储的名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
StoreType:
Type: String
Description:
en: The type of the external store. Set the value to oss.
AllowedValues:
- oss
Required: true
Project:
Type: String
Description:
en: A short description of struct
Required: true
Endpoint:
Type: String
Description:
en: The OSS endpoint.
Required: true
Bucket:
Type: String
Description:
en: The name of the OSS bucket.
Required: true
AccessId:
Type: String
Description:
en: The AccessKey ID.
Required: true
Objects:
AssociationPropertyMetadata:
Parameter:
Type: String
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: 'The associated OSS objects. Valid values of n: 1 to 100.'
Required: true
MinLength: 1
MaxLength: 100
Columns:
AssociationPropertyMetadata:
Parameters:
Type:
Type: String
Description:
en: The data type of the field.
AllowedValues:
- varchar
- bigint
- double
Required: true
Name:
Type: String
Description:
en: The name of the field.
Required: true
AssociationProperty: List[Parameters]
Type: Json
Description:
en: The associated fields.
Required: true
AccessKey:
Type: String
Description:
en: The AccessKey secret.
Required: true
ExternalStoreName:
Type: String
Description:
en: The name of the external store.
Required: true
Resources:
OssExternalStore:
Type: ALIYUN::SLS::OssExternalStore
Properties:
StoreType:
Ref: StoreType
Project:
Ref: Project
Endpoint:
Ref: Endpoint
Bucket:
Ref: Bucket
AccessId:
Ref: AccessId
Objects:
Ref: Objects
Columns:
Ref: Columns
AccessKey:
Ref: AccessKey
ExternalStoreName:
Ref: ExternalStoreName
Outputs:
Project:
Description: The name of the project to which the external store belongs.
Value:
Fn::GetAtt:
- OssExternalStore
- Project
ExternalStoreName:
Description: The name of the external store.
Value:
Fn::GetAtt:
- OssExternalStore
- ExternalStoreName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"StoreType": {
"Type": "String",
"Description": {
"en": "The type of the external store. Set the value to oss."
},
"AllowedValues": [
"oss"
],
"Required": true
},
"Project": {
"Type": "String",
"Description": {
"en": "A short description of struct"
},
"Required": true
},
"Endpoint": {
"Type": "String",
"Description": {
"en": "The OSS endpoint."
},
"Required": true
},
"Bucket": {
"Type": "String",
"Description": {
"en": "The name of the OSS bucket."
},
"Required": true
},
"AccessId": {
"Type": "String",
"Description": {
"en": "The AccessKey ID."
},
"Required": true
},
"Objects": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The associated OSS objects. Valid values of n: 1 to 100."
},
"Required": true,
"MinLength": 1,
"MaxLength": 100
},
"Columns": {
"AssociationPropertyMetadata": {
"Parameters": {
"Type": {
"Type": "String",
"Description": {
"en": "The data type of the field."
},
"AllowedValues": [
"varchar",
"bigint",
"double"
],
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "The name of the field."
},
"Required": true
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "The associated fields."
},
"Required": true
},
"AccessKey": {
"Type": "String",
"Description": {
"en": "The AccessKey secret."
},
"Required": true
},
"ExternalStoreName": {
"Type": "String",
"Description": {
"en": "The name of the external store."
},
"Required": true
}
},
"Resources": {
"OssExternalStore": {
"Type": "ALIYUN::SLS::OssExternalStore",
"Properties": {
"StoreType": {
"Ref": "StoreType"
},
"Project": {
"Ref": "Project"
},
"Endpoint": {
"Ref": "Endpoint"
},
"Bucket": {
"Ref": "Bucket"
},
"AccessId": {
"Ref": "AccessId"
},
"Objects": {
"Ref": "Objects"
},
"Columns": {
"Ref": "Columns"
},
"AccessKey": {
"Ref": "AccessKey"
},
"ExternalStoreName": {
"Ref": "ExternalStoreName"
}
}
}
},
"Outputs": {
"Project": {
"Description": "The name of the project to which the external store belongs.",
"Value": {
"Fn::GetAtt": [
"OssExternalStore",
"Project"
]
}
},
"ExternalStoreName": {
"Description": "The name of the external store.",
"Value": {
"Fn::GetAtt": [
"OssExternalStore",
"ExternalStoreName"
]
}
}
}
}
文档内容是否对您有帮助?