DATASOURCE::FC::Services is used to query services.
Syntax
{
"Type": "DATASOURCE::FC::Services",
"Properties": {
"Prefix": String,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Prefix | String | No | Yes | The prefix of the service names to be returned. | The names must start with the value of Prefix. For example, if you set Prefix to a, the service names that start with a are returned. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values (Fn::GetAtt)
Services: details of the services.
ServiceNames: the names of the services.
Property | Type | Description | Constraint |
ServiceNames | List | The names of the services. | None. |
Services | List | Details of the services. | None. |
ServiceName | String | The service name. | None. |
Description | String | The description of the service. | None. |
LogConfig | Map | The log configurations. | The logs that are generated by functions are written to the specified Logstore. For more information, see LogConfig. |
ServiceId | String | The service ID. | None. |
CreatedTime | String | The time when the service was created. | None. |
LastModifiedTime | String | The most recent time when the service was modified. | None. |
VpcConfig | Map | The virtual private cloud (VPC) configurations. | Functions can access the specified VPC. For more information, see VPCConfig. |
InternetAccess | Boolean | Indicates whether functions can access the Internet. | Valid values:
|
NasConfig | Map | The configurations of the File Storage NAS (NAS) file system. | Functions can access the specified NAS file system. For more information, see NASConfig. |
VendorConfig | Map | The vendor configurations. | None. |
TracingConfig | Map | The configurations of Managed Service for OpenTelemetry. | After Function Compute is integrated with Managed Service for OpenTelemetry, you can record the duration of a request in Function Compute, view the cold start time of a function, and record the execution duration of a function. For more information about the configurations, see TracingConfig. For more information about Managed Service for OpenTelemetry, see Overview. |
Examples
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Prefix": {
"Type": "String",
"Description": "Qualified returned service names must be prefixed with Prefix. For example, if the Prefix is \"a\", the returned service names should be started with \"a\"."
}
},
"Resources": {
"Services": {
"Type": "DATASOURCE::FC::Services",
"Properties": {
"Prefix": {
"Ref": "Prefix"
}
}
}
},
"Outputs": {
"Services": {
"Description": "The list of services.",
"Value": {
"Fn::GetAtt": [
"Services",
"Services"
]
}
},
"ServiceNames": {
"Description": "The list of service names.",
"Value": {
"Fn::GetAtt": [
"Services",
"ServiceNames"
]
}
}
}
}
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Prefix:
Type: String
Description: Qualified returned service names must be prefixed with Prefix. For example, if the Prefix is "a", the returned service names should be started with "a".
Resources:
Services:
Type: DATASOURCE::FC::Services
Properties:
Prefix:
Ref: Prefix
Outputs:
Services:
Description: The list of services.
Value:
Fn::GetAtt:
- Services
- Services
ServiceNames:
Description: The list of service names.
Value:
Fn::GetAtt:
- Services
- ServiceNames