DATASOURCE::FC::Services is used to query services.

Syntax

{
  "Type": "DATASOURCE::FC::Services",
  "Properties": {
    "Prefix": String
  }
}

Properties

Property Type Required Editable Description Constraint
Prefix String No Yes The prefix of the resource name. The resource name must be prefixed with the value of this property.

For example, if you set the Prefix property to a, the returned resource name is prefixed with a.

Return values (Fn::GetAtt)

  • Services: the details of the services.
  • ServiceNames: the names of the services.
Property Type Description Constraint
ServiceNames List The names of the services. None.
Services List The details of the services. None.
ServiceName String The name of the service. None.
Description String The description of the service. None.
LogConfig Map The logging configurations. The logs that are generated by functions are written to the specified Logstore. For more information, see LogConfig
ServiceId String The ID of the service. 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:
  • true: Functions can access the Internet.
  • false: Functions cannot access the Internet.
NasConfig Map The configurations of the Apsara 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 Tracing Analysis. After Function Compute is integrated with Tracing Analysis, 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, see TracingConfig.

For more information, see Overview.

Examples

  • JSON format

    {
      "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"
            ]
          }
        }
      }
    }
  • YAML format

    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