ALIYUN::APIG::HttpApi
The ALIYUN::APIG::HttpApi resource type creates an HTTP API.
Syntax
{
"Type": "ALIYUN::APIG::HttpApi",
"Properties": {
"AuthConfig": Map,
"AgentProtocols": List,
"ResourceGroupId": String,
"Strategy": String,
"EnableAuth": Boolean,
"BelongGatewayId": String,
"IngressConfig": Map,
"ModelCategory": String,
"VersionConfig": Map,
"OnlyChangeConfig": Boolean,
"RemoveBasePathOnForward": Boolean,
"FirstByteTimeout": Integer,
"DeployConfigs": List,
"BuiltinRouteNames": List,
"AiProtocols": List,
"HttpApiName": String,
"Protocols": List,
"BasePath": String,
"Description": String,
"Type": String
}
}
Properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
HttpApiName |
String |
Yes |
No |
The API name. |
None. |
|
AgentProtocols |
List |
No |
Yes |
The list of protocols supported by the agent |
None |
|
AiProtocols |
List |
No |
Yes |
The list of AI protocols. |
None |
|
AuthConfig |
Map |
No |
Yes |
Authentication configuration |
For more information, see AuthConfig properties. |
|
BasePath |
String |
No |
Yes |
The API base path. |
Must start with /. |
|
BelongGatewayId |
String |
No |
No |
The ID of the gateway to which this API belongs |
None |
|
BuiltinRouteNames |
List |
No |
No |
The list of built-in route names |
None |
|
DeployConfigs |
List |
No |
Yes |
The list of API deployment configurations. |
For more information, see DeployConfigs properties. |
|
Description |
String |
No |
Yes |
The API description. |
None. |
|
EnableAuth |
Boolean |
No |
Yes |
Specifies whether to enable authentication |
None |
|
FirstByteTimeout |
Integer |
No |
Yes |
The first-byte timeout |
None |
|
IngressConfig |
Map |
No |
Yes |
HTTP Ingress API configuration. |
For more information, see IngressConfig properties. |
|
ModelCategory |
String |
No |
No |
The model category |
None |
|
OnlyChangeConfig |
Boolean |
No |
Yes |
Modify the configuration only |
None |
|
Protocols |
List |
No |
Yes |
The list of protocols for API access. |
Valid values:
|
|
RemoveBasePathOnForward |
Boolean |
No |
Yes |
Specifies whether to remove the base path when forwarding |
None |
|
ResourceGroupId |
String |
No |
No |
The resource group ID. |
None |
|
Strategy |
String |
No |
No |
The conflict resolution strategy for imports |
None |
|
Type |
String |
No |
No |
The type of HTTP API. |
Valid values:
|
|
VersionConfig |
Map |
No |
Yes |
API versioning configuration |
For more information, see VersionConfig properties. |
AuthConfig syntax
"AuthConfig":{
"AuthType": String,
"AuthMode": String
}
AuthConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
AuthMode |
String |
No |
Yes |
The authentication mode |
None |
|
AuthType |
String |
No |
Yes |
The authentication type |
None |
VersionConfig syntax
"VersionConfig":{
"Enable": Boolean,
"QueryName": String,
"HeaderName": String,
"Scheme": String,
"Version": String
}
VersionConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Enable |
Boolean |
No |
Yes |
Specifies whether to enable versioning. |
None |
|
HeaderName |
String |
No |
Yes |
The key in the specified Header parameter when the versioning scheme is Header-based. |
None |
|
QueryName |
String |
No |
Yes |
The key in the specified Query parameter when the versioning scheme is Query-based. |
None |
|
Scheme |
String |
No |
Yes |
The versioning scheme. |
Valid values:
|
|
Version |
String |
No |
Yes |
The version number. |
None |
IngressConfig syntax
"IngressConfig":{
"EnvironmentId": String,
"WatchNamespace": String,
"OverrideIngressIp": Boolean,
"ClusterId": String,
"IngressClass": String,
"SourceId": String
}
IngressConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ClusterId |
String |
No |
No |
The cluster ID. |
None |
|
EnvironmentId |
String |
No |
Yes |
The environment ID. |
None |
|
IngressClass |
String |
No |
Yes |
The Ingress Class to monitor. |
None |
|
OverrideIngressIp |
Boolean |
No |
Yes |
Specifies whether to update the address in Ingress Status. |
None |
|
SourceId |
String |
No |
Yes |
The source ID. |
None |
|
WatchNamespace |
String |
No |
Yes |
The namespace to monitor. |
None |
DeployConfigs syntax
"DeployConfigs":
[{
"AutoDeploy": Boolean,
"Mock": Map,
"GatewayType": String,
"GatewayInfo": Map,
"ServiceConfigs": List,
"BackendScene": String,
"CustomDomainIds": List,
"SubDomains": List,
"PolicyConfigs": List,
"EnvironmentId": String,
"CustomDomainInfos": List,
"RouteBackend": Map,
"GatewayId": String
}]
DeployConfigs properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
AutoDeploy |
Boolean |
No |
Yes |
Specifies whether to deploy automatically. |
None |
|
BackendScene |
String |
No |
Yes |
The deployment scenario. |
None |
|
CustomDomainIds |
List |
No |
Yes |
The list of IDs of user-defined domain names. |
None |
|
CustomDomainInfos |
List |
No |
Yes |
The list of user-defined domain name configurations. |
For more information, see CustomDomainInfos properties. |
|
EnvironmentId |
String |
No |
Yes |
The environment ID. |
None |
|
GatewayId |
String |
No |
Yes |
The gateway instance ID. |
None |
|
GatewayInfo |
Map |
No |
Yes |
Gateway information. |
For more information, see GatewayInfo properties. |
|
GatewayType |
String |
No |
Yes |
The gateway type. |
None |
|
Mock |
Map |
No |
Yes |
Mock configuration. |
For more information, see Mock properties. |
|
PolicyConfigs |
List |
No |
Yes |
The list of policy configurations. |
For more information, see PolicyConfigs properties. |
|
RouteBackend |
Map |
No |
Yes |
Backend service information. |
For more information, see RouteBackend properties. |
|
ServiceConfigs |
List |
No |
Yes |
The list of service configurations. |
For more information, see ServiceConfigs properties. |
|
SubDomains |
List |
No |
Yes |
The list of subdomain configurations. |
For more information, see SubDomains properties. |
GatewayInfo syntax
"GatewayInfo":{
"EngineVersion": String,
"Name": String,
"VpcInfo": Map,
"GatewayId": String
}
GatewayInfo properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
EngineVersion |
String |
No |
Yes |
The gateway engine version. |
None |
|
GatewayId |
String |
No |
Yes |
The gateway ID. |
None |
|
Name |
String |
No |
Yes |
The gateway name. |
None |
|
VpcInfo |
Map |
No |
Yes |
VPC information. |
For more information, see VpcInfo properties. |
Mock syntax
"Mock":{
"Enable": Boolean,
"ResponseCode": Integer,
"ResponseContent": String
}
Mock properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Enable |
Boolean |
No |
Yes |
Specifies whether to enable Mock. |
None |
|
ResponseCode |
Integer |
No |
Yes |
The response code. |
None |
|
ResponseContent |
String |
No |
Yes |
The response content. |
None |
VpcInfo syntax
"VpcInfo":{
"VpcId": String,
"Name": String
}
VpcInfo properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Name |
String |
No |
Yes |
The VPC name. |
None |
|
VpcId |
String |
No |
Yes |
The VPC ID. |
None |
RouteBackend syntax
"RouteBackend":{
"Scene": String,
"Services": List
}
RouteBackend properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Scene |
String |
No |
Yes |
The backend service scenario. |
None |
|
Services |
List |
No |
Yes |
The backend service. |
For more information, see Services properties. |
Services syntax
"Services":[{
"Name": String,
"Version": String,
"Port": Integer,
"Weight": Integer,
"Protocol": String,
"ServiceId": String
}]
Services properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Name |
String |
No |
Yes |
The service name. |
None |
|
Port |
Integer |
No |
Yes |
The service port. |
None |
|
Protocol |
String |
No |
Yes |
The service protocol. |
Valid values:
|
|
ServiceId |
String |
No |
Yes |
Service ID |
None |
|
Version |
String |
No |
Yes |
The service version. |
None |
|
Weight |
Integer |
No |
Yes |
The percentage of traffic allocated to the service. |
None |
SubDomains syntax
"SubDomains":[{
"DomainId": String,
"Protocol": String,
"Name": String,
"NetworkType": String
}]
SubDomains properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
DomainId |
String |
No |
Yes |
The domain name ID. |
None |
|
Name |
String |
No |
Yes |
The domain name. |
None |
|
NetworkType |
String |
No |
Yes |
The network type. |
None |
|
Protocol |
String |
No |
Yes |
The protocol. |
None |
ServiceConfigs syntax
"SubDomains":[{
"ServiceId": String,
"Name": String,
"GatewayServiceId": String,
"ModelName": String,
"ModelNamePattern": String,
"Weight": Integer,
"Version": String,
"IntentCode": String,
"ObservabilityRouteConfig": Map,
"MultiServiceRouteStrategy": String,
"Protocol": String,
"Port": Integer,
"Match": Map
}]
ServiceConfigs properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
GatewayServiceId |
String |
No |
Yes |
The service gateway ID. |
None |
|
IntentCode |
String |
No |
Yes |
The intent code. |
None |
|
Match |
Map |
No |
Yes |
The match conditions. |
For more information, see Match properties. |
|
ModelName |
String |
No |
Yes |
The model name. |
None |
|
ModelNamePattern |
String |
No |
Yes |
The model name prefix. |
None |
|
MultiServiceRouteStrategy |
String |
No |
Yes |
The multi-service routing strategy type. |
None |
|
Name |
String |
No |
Yes |
The service name. |
None |
|
ObservabilityRouteConfig |
Map |
No |
Yes |
Observability metrics routing configuration. |
For more information, see ObservabilityRouteConfig properties. |
|
Port |
Integer |
No |
Yes |
The service port number. |
None |
|
Protocol |
String |
No |
Yes |
The service protocol. |
None |
|
ServiceId |
String |
No |
Yes |
The service ID. |
None |
|
Version |
String |
No |
Yes |
The service version. |
None |
|
Weight |
Integer |
No |
Yes |
The weight. |
None |
Match syntax
"Match":{
"Default": Boolean,
"Conditions": List
}
Match properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Conditions |
List |
No |
Yes |
Match condition configuration. |
For more information, see Conditions properties. |
|
Default |
Boolean |
No |
Yes |
Specifies whether this is the default match condition. |
None |
Conditions syntax
"Conditions":{
"Value": String,
"Type": String,
"Operator": String,
"Key": String
}
Conditions properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Key |
String |
No |
Yes |
The key to match. |
None |
|
Operator |
String |
No |
Yes |
The operator. |
Supports exact matching, prefix matching, and regular expressions. Valid values:
|
|
Type |
String |
No |
Yes |
The match type. |
Supports matching Query or Header parameters. |
|
Value |
String |
No |
Yes |
The value to match. |
None |
ObservabilityRouteConfig syntax
"ObservabilityRouteConfig":{
"QueueSize": Integer,
"Mode": String,
"RateLimit": Number
}
ObservabilityRouteConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Mode |
String |
No |
Yes |
The routing mode. |
None |
|
QueueSize |
Integer |
No |
Yes |
The queue size. |
None |
|
RateLimit |
Number |
No |
Yes |
The maximum traffic share for a single service. |
None |
CustomDomainInfos syntax
"CustomDomainInfos":[{
"DomainId": String,
"Protocol": String,
"Name": String
}]
CustomDomainInfos properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
DomainId |
String |
No |
Yes |
The domain name ID. |
None |
|
Name |
String |
No |
Yes |
The domain name. |
None |
|
Protocol |
String |
No |
Yes |
The protocol. |
None |
PolicyConfigs syntax
"PolicyConfigs":[{
"Enable": Boolean,
"SemanticRouterConfig": Map,
"AiToolSelectionConfig": Map,
"AiSecurityGuardConfig": Map,
"Type": String,
"AiStatisticsConfig": Map,
"AiFallbackConfig": Map,
"AiNetworkSearchConfig": Map,
"AiTokenRateLimitConfig": Map,
"AiCacheConfig": Map
}]
PolicyConfigs properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
AiCacheConfig |
Map |
No |
Yes |
AI cache configuration. |
For more information, see AiCacheConfig properties. |
|
AiFallbackConfig |
Map |
No |
Yes |
AI fallback configuration. |
For more information, see AiFallbackConfig properties. |
|
AiNetworkSearchConfig |
Map |
No |
Yes |
AI network search configuration. |
For more information, see AiNetworkSearchConfig properties. |
|
AiSecurityGuardConfig |
Map |
No |
Yes |
AI security protection configuration. |
For more information, see AiSecurityGuardConfig properties. |
|
AiStatisticsConfig |
Map |
No |
Yes |
AI statistics configuration. |
For more information, see AiStatisticsConfig properties. |
|
AiTokenRateLimitConfig |
Map |
No |
Yes |
AI token rate limiting configuration. |
For more information, see AiTokenRateLimitConfig properties. |
|
AiToolSelectionConfig |
Map |
No |
Yes |
The protocol. |
For more information, see AiToolSelectionConfig properties. |
|
Enable |
Boolean |
No |
Yes |
Specifies whether to enable. |
None |
|
SemanticRouterConfig |
Map |
No |
Yes |
Semantic routing configuration. |
For more information, see SemanticRouterConfig properties. |
|
Type |
String |
No |
Yes |
The policy template type. |
None |
AiStatisticsConfig syntax
"AiStatisticsConfig":{
"LogResponseContent": Boolean,
"PathFieldConfigs": List,
"LogRequestContent": Boolean
}
AiStatisticsConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
LogRequestContent |
Boolean |
No |
Yes |
Specifies whether to log request content |
None |
|
LogResponseContent |
Boolean |
No |
Yes |
Specifies whether to log response content |
None |
|
PathFieldConfigs |
List |
No |
Yes |
The list of custom field collection configurations, configured by API path |
For more information, see PathFieldConfigs properties. |
PathFieldConfigs syntax
"PathFieldConfigs":{
"Path": String,
"FieldPaths": List
}
PathFieldConfigs properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
FieldPaths |
List |
No |
Yes |
Field collection configuration. |
None |
|
Path |
String |
No |
Yes |
API path |
None |
AiNetworkSearchConfig syntax
"AiNetworkSearchConfig":{
"SearchFrom": Map,
"NeedReference": Boolean,
"SearchRewrite": Map,
"PluginStatus": Map,
"DefaultLang": String,
"DefaultEnable": Boolean,
"SearchEngineConfig": Map,
"ReferenceFormat": String,
"ReferenceLocation": String
}
AiNetworkSearchConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
DefaultEnable |
Boolean |
No |
Yes |
Enabled by default |
None |
|
DefaultLang |
String |
No |
Yes |
The default language |
None |
|
NeedReference |
Boolean |
No |
Yes |
Specifies whether a reference is required |
None |
|
PluginStatus |
Map |
No |
Yes |
The plugin status. |
For more information, see PluginStatus properties. |
|
ReferenceFormat |
String |
No |
Yes |
Reference format |
None |
|
ReferenceLocation |
String |
No |
Yes |
Reference location |
None |
|
SearchEngineConfig |
Map |
No |
Yes |
Search engine configuration |
For more information, see SearchEngineConfig properties. |
|
SearchFrom |
Map |
No |
Yes |
Search source |
For more information, see SearchFrom properties. |
|
SearchRewrite |
Map |
No |
Yes |
Search rewriting |
For more information, see SearchRewrite properties. |
SearchFrom syntax
"SearchFrom":{
"OptionArgs": String,
"Type": String,
"ApiKey": String,
"TimeRange": Map,
"Industry": String,
"Endpoint": String,
"ContentMode": String,
"Start": Integer,
"TimeoutMillisecond": Integer,
"Count": Integer
}
SearchFrom properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ApiKey |
String |
No |
Yes |
API Key |
None |
|
ContentMode |
String |
No |
Yes |
Content mode |
None |
|
Count |
Integer |
No |
Yes |
The number of statistics items |
None |
|
Endpoint |
String |
No |
Yes |
The gateway endpoint. |
None |
|
Industry |
String |
No |
Yes |
The industry type of the instance |
None |
|
OptionArgs |
String |
No |
Yes |
Optional arguments |
None |
|
Start |
Integer |
No |
Yes |
The schedule start time. |
None |
|
TimeoutMillisecond |
Integer |
No |
Yes |
Timeout |
None |
|
TimeRange |
Map |
No |
Yes |
Time range |
None |
|
Type |
String |
No |
Yes |
Type. |
None |
PluginStatus syntax
"PluginStatus":{
"ErrorLogs": String,
"ServiceHealthy": Boolean,
"PluginId": String
}
PluginStatus properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ErrorLogs |
String |
No |
Yes |
Error logs |
None |
|
PluginId |
String |
No |
Yes |
Plugin ID |
None |
|
ServiceHealthy |
Boolean |
No |
Yes |
Service health status |
None |
SearchEngineConfig syntax
"SearchEngineConfig":{
"OptionArgs": String,
"Type": String,
"ApiKey": String,
"TimeRange": Map,
"Industry": String,
"Endpoint": String,
"ContentMode": String,
"Start": Integer,
"TimeoutMillisecond": Integer,
"Count": Integer
}
SearchEngineConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ApiKey |
String |
No |
Yes |
API Key |
None |
|
ContentMode |
String |
No |
Yes |
Content mode |
None |
|
Count |
Integer |
No |
Yes |
Count |
None |
|
Endpoint |
String |
No |
Yes |
Endpoint |
None |
|
Industry |
String |
No |
Yes |
The industry type of the instance |
None |
|
OptionArgs |
String |
No |
Yes |
Error logs |
None |
|
Start |
Integer |
No |
Yes |
Start time |
None |
|
TimeoutMillisecond |
Integer |
No |
Yes |
Timeout |
None |
|
TimeRange |
Map |
No |
Yes |
Time range |
None |
|
Type |
String |
No |
Yes |
The plugin type. |
None |
SearchRewrite syntax
"SearchRewrite":{
"Enable": Boolean,
"MaxCount": Integer,
"ModelName": String,
"ServiceId": String,
"TimeoutMillisecond": Integer
}
SearchRewrite properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Enable |
Boolean |
No |
Yes |
Specifies whether to enable |
None |
|
MaxCount |
Integer |
No |
Yes |
The maximum count |
None |
|
ModelName |
String |
No |
Yes |
Model name |
None |
|
ServiceId |
String |
No |
Yes |
Service ID |
None |
|
TimeoutMillisecond |
Integer |
No |
Yes |
Timeout |
None |
AiFallbackConfig syntax
"AiFallbackConfig":{
"OnlyRedirectUpstreamCode": Boolean,
"ServiceConfigs": List,
"RouteEmbedded": Boolean
}
AiFallbackConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
OnlyRedirectUpstreamCode |
Boolean |
No |
Yes |
Redirect upstream codes only |
None |
|
RouteEmbedded |
Boolean |
No |
Yes |
Specifies whether to embed the route |
None |
|
ServiceConfigs |
List |
No |
Yes |
The list of service configurations |
For more information, see ServiceConfigs properties. |
AiTokenRateLimitConfig syntax
"AiTokenRateLimitConfig":{
"GlobalRules": List,
"RedisConfig": Map,
"PluginStatus": Map,
"EnableGlobalRules": Boolean,
"Rules": List
}
AiTokenRateLimitConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
EnableGlobalRules |
Boolean |
No |
Yes |
Enable global rules |
None |
|
GlobalRules |
List |
No |
Yes |
Global rules |
For more information, see GlobalRules properties. |
|
PluginStatus |
Map |
No |
Yes |
The plugin status. |
For more information, see PluginStatus properties. |
|
RedisConfig |
Map |
No |
Yes |
Redis configuration |
For more information, see RedisConfig properties. |
|
Rules |
List |
No |
Yes |
The list of rules |
For more information, see Rules properties. |
Rules syntax
"Rules":[{
"LimitType": String,
"MatchKey": String,
"LimitMode": String,
"LimitValue": Integer,
"MatchType": String,
"MatchValue": String
}]
Rules properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
LimitMode |
String |
No |
Yes |
The rate limiting mode |
None |
|
LimitType |
String |
No |
Yes |
The rate limiting type |
None |
|
LimitValue |
Integer |
No |
Yes |
The rate limit value |
None |
|
MatchKey |
String |
No |
Yes |
The match key |
None |
|
MatchType |
String |
No |
Yes |
The query match type |
None |
|
MatchValue |
String |
No |
Yes |
Match value |
None |
GlobalRules syntax
"GlobalRules":[{
"LimitType": String,
"MatchKey": String,
"LimitMode": String,
"LimitValue": Integer,
"MatchType": String,
"MatchValue": String
}]
GlobalRules properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
LimitMode |
String |
No |
Yes |
The rate limiting mode |
None |
|
LimitType |
String |
No |
Yes |
The rate limiting type |
None |
|
LimitValue |
Integer |
No |
Yes |
The rate limit value |
None |
|
MatchKey |
String |
No |
Yes |
The match key |
None |
|
MatchType |
String |
No |
Yes |
The query match type |
None |
|
MatchValue |
String |
No |
Yes |
Match value |
None |
RedisConfig syntax
"RedisConfig":{
"Host": String,
"Username": String,
"Port": Integer,
"Timeout": Integer,
"DatabaseNumber": Integer,
"Password": String
}
RedisConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
DatabaseNumber |
Integer |
No |
Yes |
The number of database connections |
None |
|
Host |
String |
No |
Yes |
The IP address of the node. |
None |
|
Password |
String |
No |
Yes |
Password |
None |
|
Port |
Integer |
No |
Yes |
Port number |
None |
|
Timeout |
Integer |
No |
Yes |
The health check response timeout. |
Unit: seconds. |
|
Username |
String |
No |
Yes |
Username |
None |
AiCacheConfig syntax
"AiCacheConfig":{
"CacheTTL": Integer,
"CacheKeyStrategy": String,
"VectorConfig": Map,
"PluginStatus": Map,
"RedisConfig": Map,
"EmbeddingConfig": Map,
"CacheMode": String
}
AiCacheConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
CacheKeyStrategy |
String |
No |
Yes |
The cache key strategy |
None |
|
CacheMode |
String |
No |
Yes |
The cache mode |
|
|
CacheTTL |
Integer |
No |
Yes |
The cache time to live (TTL) |
None |
|
EmbeddingConfig |
Map |
No |
Yes |
Embedding configuration |
For more information, see EmbeddingConfig properties. |
|
PluginStatus |
Map |
No |
Yes |
The plugin status. |
For more information, see PluginStatus properties. |
|
RedisConfig |
Map |
No |
Yes |
Redis configuration |
For more information, see RedisConfig properties. |
|
VectorConfig |
Map |
No |
Yes |
Vector configuration |
For more information, see VectorConfig properties. |
EmbeddingConfig syntax
"EmbeddingConfig":{
"ModelName": String,
"ServiceId": String,
"Type": String,
"Timeout": Integer
}
EmbeddingConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ModelName |
String |
No |
Yes |
Model name |
None |
|
ServiceId |
String |
No |
Yes |
Service ID |
None |
|
Timeout |
Integer |
No |
Yes |
The health check response timeout. |
Unit: seconds. |
|
Type |
String |
No |
Yes |
Type |
None |
VectorConfig syntax
"VectorConfig":{
"ApiKey": String,
"Timeout": Integer,
"ServiceHost": String,
"Type": String,
"Threshold": Number,
"CollectionId": String
}
VectorConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ApiKey |
String |
No |
Yes |
API Key |
None |
|
CollectionId |
String |
No |
Yes |
The collection ID |
None |
|
ServiceHost |
String |
No |
Yes |
The service host address |
None |
|
Threshold |
Number |
No |
Yes |
Threshold |
None |
|
Timeout |
Integer |
No |
Yes |
The health check response timeout. |
Unit: seconds. |
|
Type |
String |
No |
Yes |
Type |
None |
AiSecurityGuardConfig syntax
"AiSecurityGuardConfig":{
"RiskConfig": List,
"ConsumerRequestCheckService": List,
"RequestImageCheckService": String,
"CheckResponseImage": Boolean,
"RiskAlertLevel": String,
"CheckResponse": Boolean,
"BufferLimit": Integer,
"PluginStatus": Map,
"RequestCheckService": String,
"CheckRequest": Boolean,
"ConsumerRiskLevel": List,
"ResponseCheckService": String,
"ConsumerResponseCheckService": List,
"ResponseImageCheckService": String,
"CheckRequestImage": Boolean,
"ServiceAddress": String
}
AiSecurityGuardConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
BufferLimit |
Integer |
No |
Yes |
The maximum buffer size |
None |
|
CheckRequest |
Boolean |
No |
Yes |
Check requests |
None |
|
CheckRequestImage |
Boolean |
No |
Yes |
Check images in requests |
None |
|
CheckResponse |
Boolean |
No |
Yes |
Check responses |
None |
|
CheckResponseImage |
Boolean |
No |
Yes |
Check images in responses |
None |
|
ConsumerRequestCheckService |
List |
No |
Yes |
Consumer request validation service |
For more information, see ConsumerRequestCheckService properties. |
|
ConsumerResponseCheckService |
List |
No |
Yes |
Consumer response validation service |
For more information, see ConsumerResponseCheckService properties. |
|
ConsumerRiskLevel |
List |
No |
Yes |
Consumer risk level |
For more information, see ConsumerRiskLevel properties. |
|
PluginStatus |
Map |
No |
Yes |
The current plugin status |
For more information, see PluginStatus properties. |
|
RequestCheckService |
String |
No |
Yes |
Request check service |
None |
|
RequestImageCheckService |
String |
No |
Yes |
Request image check service |
None |
|
ResponseCheckService |
String |
No |
Yes |
Response check service |
None |
|
ResponseImageCheckService |
String |
No |
Yes |
Response image check service |
None |
|
RiskAlertLevel |
String |
No |
Yes |
The risk alert level |
None |
|
RiskConfig |
List |
No |
Yes |
Risk configuration |
For more information, see RiskConfig properties. |
|
ServiceAddress |
String |
No |
Yes |
Service address |
None |
ConsumerRiskLevel syntax
"ConsumerRiskLevel":[{
"Level": String,
"Name": String,
"Type": String,
"MatchType": String
}]
ConsumerRiskLevel properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Level |
String |
No |
Yes |
The conflict level |
None |
|
MatchType |
String |
No |
Yes |
The query match type |
None |
|
Name |
String |
No |
Yes |
The parameter name. |
None |
|
Type |
String |
No |
Yes |
Type |
None |
RiskConfig syntax
"RiskConfig":[{
"ConsumerRules": Map,
"Type": String,
"Level": String
}]
RiskConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ConsumerRules |
Map |
No |
Yes |
Consumer rules |
For more information, see ConsumerRules properties. |
|
Level |
String |
No |
Yes |
The conflict level |
None |
|
Type |
String |
No |
Yes |
The plugin type. |
None |
ConsumerRules syntax
"ConsumerRules":{
"Pattern": String,
"MatchType": String
}
ConsumerRules properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
MatchType |
String |
No |
Yes |
The query match type |
None |
|
Pattern |
String |
No |
Yes |
The matching pattern |
None |
ConsumerRequestCheckService syntax
"ConsumerRequestCheckService":[{
"RequestCheckService": String,
"ModalityType": String,
"MatchType": String,
"RequestImageCheckService": String,
"Name": String
}]
ConsumerRequestCheckService properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
MatchType |
String |
No |
Yes |
The query match type |
None |
|
ModalityType |
String |
No |
Yes |
The modality type |
None |
|
Name |
String |
No |
Yes |
Service name |
None |
|
RequestCheckService |
String |
No |
Yes |
Request validation service |
None |
|
RequestImageCheckService |
String |
No |
Yes |
Request image validation service |
None |
ConsumerResponseCheckService syntax
"ConsumerResponseCheckService":[{
"ModalityType": String,
"ResponseCheckService": String,
"MatchType": String,
"ResponseImageCheckService": String,
"Name": String
}]
ConsumerResponseCheckService properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
MatchType |
String |
No |
Yes |
The query match type |
None |
|
ModalityType |
String |
No |
Yes |
The modality type |
None |
|
Name |
String |
No |
Yes |
Service name |
None |
|
ResponseCheckService |
String |
No |
Yes |
Response check service |
None |
|
ResponseImageCheckService |
String |
No |
Yes |
Response image check service |
None |
SemanticRouterConfig syntax
"SemanticRouterConfig":{
"TimeoutMillisecond": Integer
}
SemanticRouterConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
TimeoutMillisecond |
Integer |
No |
Yes |
Timeout |
None |
AiToolSelectionConfig syntax
"AiToolSelectionConfig":{
"EnableConditions": Map,
"QueryRewriting": Map,
"ToolReranking": Map,
"PluginStatus": Map
}
AiToolSelectionConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
EnableConditions |
Map |
No |
Yes |
Enable conditions |
For more information, see EnableConditions properties. |
|
PluginStatus |
Map |
No |
Yes |
Plugin status |
For more information, see PluginStatus properties. |
|
QueryRewriting |
Map |
No |
Yes |
Query rewriting |
For more information, see QueryRewriting properties. |
|
ToolReranking |
Map |
No |
Yes |
Tool reranking |
For more information, see ToolReranking properties. |
QueryRewriting syntax
"QueryRewriting":{
"FallbackStrategy": String,
"TriggerConditions": Map,
"ContextSelection": Map,
"MaxOutputTokens": Integer,
"ModelService": Map,
"Enabled": Boolean,
"PromptConfig": Map
}
QueryRewriting properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ContextSelection |
Map |
No |
Yes |
Context selection |
For more information, see ContextSelection properties. |
|
Enabled |
Boolean |
No |
Yes |
Specifies whether to enable cluster audit logging. |
None |
|
FallbackStrategy |
String |
No |
Yes |
Fallback strategy |
None |
|
MaxOutputTokens |
Integer |
No |
Yes |
The maximum number of output tokens |
None |
|
ModelService |
Map |
No |
Yes |
Model service |
For more information, see ModelService properties. |
|
PromptConfig |
Map |
No |
Yes |
Prompt configuration |
For more information, see PromptConfig properties. |
|
TriggerConditions |
Map |
No |
Yes |
Trigger conditions |
For more information, see TriggerConditions properties. |
PromptConfig syntax
"PromptConfig":{
"Type": String,
"CustomPrompt": String
}
PromptConfig properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
CustomPrompt |
String |
No |
Yes |
The extraction instructions |
None |
|
Type |
String |
No |
Yes |
The plugin type. |
None |
TriggerConditions syntax
"TriggerConditions":{
"MessageCountThreshold": Integer
}
TriggerConditions properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
MessageCountThreshold |
Integer |
No |
Yes |
The message count threshold |
None |
ContextSelection syntax
"ContextSelection":{
"Type": String,
"Value": String
}
ContextSelection properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
Type |
String |
No |
Yes |
The plugin type. |
None |
|
Value |
String |
No |
Yes |
The value to match. |
None |
ModelService syntax
"ModelService":{
"ModelName": String,
"ServiceId": String,
"TimeoutMillisecond": Integer
}
ModelService properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ModelName |
String |
No |
Yes |
Model name |
None |
|
ServiceId |
String |
No |
Yes |
Service ID |
None |
|
TimeoutMillisecond |
Integer |
No |
Yes |
Timeout |
None |
ToolReranking syntax
"ToolReranking":{
"FallbackStrategy": String,
"FilteringMethod": String,
"ScoreThreshold": Number,
"TopNCount": Integer,
"ModelService": Map,
"TopKPercent": Number
}
ToolReranking properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
FallbackStrategy |
String |
No |
Yes |
Fallback strategy |
None |
|
FilteringMethod |
String |
No |
Yes |
The filtering method |
None |
|
ModelService |
Map |
No |
Yes |
Model service |
For more information, see ModelService properties. |
|
ScoreThreshold |
Number |
No |
Yes |
The score threshold |
None |
|
TopKPercent |
Number |
No |
Yes |
The top K percentage |
None |
|
TopNCount |
Integer |
No |
Yes |
The top N count |
None |
EnableConditions syntax
"EnableConditions":{
"ToolCountThreshold": Integer
}
EnableConditions properties
|
Property |
Type |
Required |
Updatable |
Description |
Constraints |
|
ToolCountThreshold |
Integer |
No |
Yes |
The tool count threshold |
None |
Return value
Fn::GetAtt
-
HttpApiId:HTTP API ID.
Example
Scenario 1: Create an HTTP API.
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Create an HTTP API for internal service invocation or development and testing.
en: Create an HTTP API for internal service calls or dev/test environments.
Parameters:
HttpApiName:
Type: String
Label:
zh-cn: APIName
en: API Name
Description:
zh-cn: HTTP API name, 1 to 64 characters long.
en: The name of the HTTP API, 1 to 64 characters.
MinLength: 1
MaxLength: 64
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: my-api-
CharacterClasses:
- Class: lowercase
min: 1
Default: my-api
Resources:
HttpApi:
Type: ALIYUN::APIG::HttpApi
Properties:
HttpApiName:
Ref: HttpApiName
Type: Http
Protocols:
- HTTP
BasePath: /
Outputs:
HttpApiId:
Label:
zh-cn: API ID
en: API ID
Value:
Fn::GetAtt:
- HttpApi
- HttpApiId{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "Create an HTTP API for internal service invocation or development and testing.",
"en": "Create an HTTP API for internal service calls or dev/test environments."
},
"Parameters": {
"HttpApiName": {
"Type": "String",
"Label": {
"zh-cn": "APIName",
"en": "API Name"
},
"Description": {
"zh-cn": "HTTP API name, 1 to 64 characters long.",
"en": "The name of the HTTP API, 1 to 64 characters."
},
"MinLength": 1,
"MaxLength": 64,
"AssociationProperty": "AutoCompleteInput",
"AssociationPropertyMetadata": {
"Length": 5,
"Prefix": "my-api-",
"CharacterClasses": [
{
"Class": "lowercase",
"min": 1
}
]
},
"Default": "my-api"
}
},
"Resources": {
"HttpApi": {
"Type": "ALIYUN::APIG::HttpApi",
"Properties": {
"HttpApiName": {
"Ref": "HttpApiName"
},
"Type": "Http",
"Protocols": [
"HTTP"
],
"BasePath": "/"
}
}
},
"Outputs": {
"HttpApiId": {
"Label": {
"zh-cn": "API ID",
"en": "API ID"
},
"Value": {
"Fn::GetAtt": [
"HttpApi",
"HttpApiId"
]
}
}
}
}Scenario 2: Create a RESTful API that supports both HTTP and HTTPS, and configure a versioned base path.
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Create a REST API that supports both HTTP and HTTPS, and configure a versioned base path.
en: Create a RESTful API with both HTTP and HTTPS, with a versioned base path.
Parameters:
HttpApiName:
Type: String
Label:
zh-cn: APIName
en: API Name
Description:
zh-cn: RESTful API name, 1 to 64 characters long.
en: The name of the RESTful API, 1 to 64 characters.
MinLength: 1
MaxLength: 64
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: rest-api-
CharacterClasses:
- Class: lowercase
min: 1
Default: rest-api
BasePath:
Type: String
Label:
zh-cn: APIBase path
en: API Base Path
Description:
zh-cn: >-
API base path, which must start with /. Use a version number as the path prefix,
such as /v1 or /v2, to manage API versions.
en: >-
The base path of the API, must start with /.
Using a version prefix like /v1, /v2 is recommended.
Default: /v1
AllowedValues:
- /v1
- /v2
- /api/v1
- /api/v2
Description:
Type: String
Label:
zh-cn: APIDescription
en: API Description
Description:
zh-cn: API description.
en: Functional description of the API.
Default: RESTful API service for the production environment
MaxLength: 256
Resources:
RestApi:
Type: ALIYUN::APIG::HttpApi
Properties:
HttpApiName:
Ref: HttpApiName
Type: Rest
Protocols:
- HTTP
- HTTPS
BasePath:
Ref: BasePath
Description:
Ref: Description
Outputs:
HttpApiId:
Label:
zh-cn: API ID
en: API ID
Value:
Fn::GetAtt:
- RestApi
- HttpApiId{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "Create a REST API that supports both HTTP and HTTPS, and configure a versioned base path.",
"en": "Create a RESTful API with both HTTP and HTTPS, with a versioned base path."
},
"Parameters": {
"HttpApiName": {
"Type": "String",
"Label": {
"zh-cn": "APIName",
"en": "API Name"
},
"Description": {
"zh-cn": "RESTful API name, 1 to 64 characters long.",
"en": "The name of the RESTful API, 1 to 64 characters."
},
"MinLength": 1,
"MaxLength": 64,
"AssociationProperty": "AutoCompleteInput",
"AssociationPropertyMetadata": {
"Length": 5,
"Prefix": "rest-api-",
"CharacterClasses": [
{
"Class": "lowercase",
"min": 1
}
]
},
"Default": "rest-api"
},
"BasePath": {
"Type": "String",
"Label": {
"zh-cn": "APIBase path",
"en": "API Base Path"
},
"Description": {
"zh-cn": "API base path, which must start with /. Use a version number as the path prefix, such as /v1 or /v2, to manage API versions.",
"en": "The base path of the API, must start with /. Using a version prefix like /v1, /v2 is recommended."
},
"Default": "/v1",
"AllowedValues": [
"/v1",
"/v2",
"/api/v1",
"/api/v2"
]
},
"Description": {
"Type": "String",
"Label": {
"zh-cn": "APIDescription",
"en": "API Description"
},
"Description": {
"zh-cn": "API description.",
"en": "Functional description of the API."
},
"Default": "RESTful API service for the production environment",
"MaxLength": 256
}
},
"Resources": {
"RestApi": {
"Type": "ALIYUN::APIG::HttpApi",
"Properties": {
"HttpApiName": {
"Ref": "HttpApiName"
},
"Type": "Rest",
"Protocols": [
"HTTP",
"HTTPS"
],
"BasePath": {
"Ref": "BasePath"
},
"Description": {
"Ref": "Description"
}
}
}
},
"Outputs": {
"HttpApiId": {
"Label": {
"zh-cn": "API ID",
"en": "API ID"
},
"Value": {
"Fn::GetAtt": [
"RestApi",
"HttpApiId"
]
}
}
}
}Scenario 3: Create a WebSocket API and configure a secure domain name over HTTPS to provide real-time communication.
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Create a WebSocket API and configure a secure domain name over HTTPS to provide secure real-time communication.
en: Create a WebSocket API with an HTTPS domain for secure real-time communication.
Parameters:
HttpApiName:
Type: String
Label:
zh-cn: APIName
en: API Name
Description:
zh-cn: WebSocket API name, 1 to 64 characters long.
en: The name of the WebSocket API, 1 to 64 characters.
MinLength: 1
MaxLength: 64
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: ws-api-
CharacterClasses:
- Class: lowercase
min: 1
Default: ws-api
BasePath:
Type: String
Label:
zh-cn: WebSocketBase path
en: WebSocket Base Path
Description:
zh-cn: WebSocket API base path, which must start with /.
en: The base path of the WebSocket API, must start with /.
Default: /ws
DomainName:
Type: String
Label:
zh-cn: Domain name
en: Domain Name
Description:
zh-cn: >-
WebSocketThe service domain name, for example, ws.example.com.
The required domain filing and DNS resolution must be complete.
en: >-
The domain name for WebSocket service, e.g. ws.example.com.
DNS resolution and ICP filing must be completed.
AllowedPattern: '^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$'
CertIdentifier:
Type: String
Label:
zh-cn: SSLCertificate ID
en: SSL Certificate Identifier
Description:
zh-cn: SSLThe unique certificate ID, available in the SSL Certificates console. The certificate must match the domain name.
en: >-
The unique identifier of the SSL certificate.
The certificate must match the domain name.
Resources:
WebSocketApi:
Type: ALIYUN::APIG::HttpApi
Properties:
HttpApiName:
Ref: HttpApiName
Type: WebSocket
Protocols:
- HTTPS
BasePath:
Ref: BasePath
Description:
Fn::Sub: WebSocketreal-time communicationAPI - ${HttpApiName}
Domain:
Type: ALIYUN::APIG::Domain
Properties:
DomainName:
Ref: DomainName
Protocol: HTTPS
CertIdentifier:
Ref: CertIdentifier
ForceHttps: true
TlsMin: TLS 1.2
TlsMax: TLS 1.3
Http2Option: Open
Outputs:
HttpApiId:
Label:
zh-cn: API ID
en: API ID
Value:
Fn::GetAtt:
- WebSocketApi
- HttpApiId
DomainId:
Label:
zh-cn: Domain nameID
en: Domain ID
Value:
Fn::GetAtt:
- Domain
- DomainId
DomainName:
Label:
zh-cn: Domain name
en: Domain Name
Value:
Fn::GetAtt:
- Domain
- DomainName{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "Create a WebSocket API and configure a secure domain name over HTTPS to provide secure real-time communication.",
"en": "Create a WebSocket API with an HTTPS domain for secure real-time communication."
},
"Parameters": {
"HttpApiName": {
"Type": "String",
"Label": {
"zh-cn": "APIName",
"en": "API Name"
},
"Description": {
"zh-cn": "WebSocket API name, 1 to 64 characters long.",
"en": "The name of the WebSocket API, 1 to 64 characters."
},
"MinLength": 1,
"MaxLength": 64,
"AssociationProperty": "AutoCompleteInput",
"AssociationPropertyMetadata": {
"Length": 5,
"Prefix": "ws-api-",
"CharacterClasses": [
{
"Class": "lowercase",
"min": 1
}
]
},
"Default": "ws-api"
},
"BasePath": {
"Type": "String",
"Label": {
"zh-cn": "WebSocketBase path",
"en": "WebSocket Base Path"
},
"Description": {
"zh-cn": "WebSocket API base path, which must start with /.",
"en": "The base path of the WebSocket API, must start with /."
},
"Default": "/ws"
},
"DomainName": {
"Type": "String",
"Label": {
"zh-cn": "Domain name",
"en": "Domain Name"
},
"Description": {
"zh-cn": "WebSocketThe service domain name, for example, ws.example.com. The required domain filing and DNS resolution must be complete.",
"en": "The domain name for WebSocket service, e.g. ws.example.com. DNS resolution and ICP filing must be completed."
},
"AllowedPattern": "^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$"
},
"CertIdentifier": {
"Type": "String",
"Label": {
"zh-cn": "SSLCertificate ID",
"en": "SSL Certificate Identifier"
},
"Description": {
"zh-cn": "SSLThe unique certificate ID, available in the SSL Certificates console. The certificate must match the domain name.",
"en": "The unique identifier of the SSL certificate. The certificate must match the domain name."
}
}
},
"Resources": {
"WebSocketApi": {
"Type": "ALIYUN::APIG::HttpApi",
"Properties": {
"HttpApiName": {
"Ref": "HttpApiName"
},
"Type": "WebSocket",
"Protocols": [
"HTTPS"
],
"BasePath": {
"Ref": "BasePath"
},
"Description": {
"Fn::Sub": "WebSocketreal-time communicationAPI - ${HttpApiName}"
}
}
},
"Domain": {
"Type": "ALIYUN::APIG::Domain",
"Properties": {
"DomainName": {
"Ref": "DomainName"
},
"Protocol": "HTTPS",
"CertIdentifier": {
"Ref": "CertIdentifier"
},
"ForceHttps": true,
"TlsMin": "TLS 1.2",
"TlsMax": "TLS 1.3",
"Http2Option": "Open"
}
}
},
"Outputs": {
"HttpApiId": {
"Label": {
"zh-cn": "API ID",
"en": "API ID"
},
"Value": {
"Fn::GetAtt": [
"WebSocketApi",
"HttpApiId"
]
}
},
"DomainId": {
"Label": {
"zh-cn": "Domain nameID",
"en": "Domain ID"
},
"Value": {
"Fn::GetAtt": [
"Domain",
"DomainId"
]
}
},
"DomainName": {
"Label": {
"zh-cn": "Domain name",
"en": "Domain Name"
},
"Value": {
"Fn::GetAtt": [
"Domain",
"DomainName"
]
}
}
}
}