1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. fc
  5. getServices
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.fc.getServices

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the Function Compute services of the current Alibaba Cloud user.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const fcServicesDs = alicloud.fc.getServices({
    nameRegex: "sample_fc_service",
});
export const firstFcServiceName = fcServicesDs.then(fcServicesDs => fcServicesDs.services?.[0]?.name);
Copy
import pulumi
import pulumi_alicloud as alicloud

fc_services_ds = alicloud.fc.get_services(name_regex="sample_fc_service")
pulumi.export("firstFcServiceName", fc_services_ds.services[0].name)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fcServicesDs, err := fc.GetServices(ctx, &fc.GetServicesArgs{
			NameRegex: pulumi.StringRef("sample_fc_service"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstFcServiceName", fcServicesDs.Services[0].Name)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var fcServicesDs = AliCloud.FC.GetServices.Invoke(new()
    {
        NameRegex = "sample_fc_service",
    });

    return new Dictionary<string, object?>
    {
        ["firstFcServiceName"] = fcServicesDs.Apply(getServicesResult => getServicesResult.Services[0]?.Name),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fc.FcFunctions;
import com.pulumi.alicloud.fc.inputs.GetServicesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var fcServicesDs = FcFunctions.getServices(GetServicesArgs.builder()
            .nameRegex("sample_fc_service")
            .build());

        ctx.export("firstFcServiceName", fcServicesDs.applyValue(getServicesResult -> getServicesResult.services()[0].name()));
    }
}
Copy
variables:
  fcServicesDs:
    fn::invoke:
      function: alicloud:fc:getServices
      arguments:
        nameRegex: sample_fc_service
outputs:
  firstFcServiceName: ${fcServicesDs.services[0].name}
Copy

Using getServices

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getServices(args: GetServicesArgs, opts?: InvokeOptions): Promise<GetServicesResult>
function getServicesOutput(args: GetServicesOutputArgs, opts?: InvokeOptions): Output<GetServicesResult>
Copy
def get_services(ids: Optional[Sequence[str]] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetServicesResult
def get_services_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name_regex: Optional[pulumi.Input[str]] = None,
                 output_file: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetServicesResult]
Copy
func GetServices(ctx *Context, args *GetServicesArgs, opts ...InvokeOption) (*GetServicesResult, error)
func GetServicesOutput(ctx *Context, args *GetServicesOutputArgs, opts ...InvokeOption) GetServicesResultOutput
Copy

> Note: This function is named GetServices in the Go SDK.

public static class GetServices 
{
    public static Task<GetServicesResult> InvokeAsync(GetServicesArgs args, InvokeOptions? opts = null)
    public static Output<GetServicesResult> Invoke(GetServicesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServicesResult> getServices(GetServicesArgs args, InvokeOptions options)
public static Output<GetServicesResult> getServices(GetServicesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:fc/getServices:getServices
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids List<string>
A list of FC services ids.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by FC service name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Ids []string
A list of FC services ids.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by FC service name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ids List<String>
A list of FC services ids.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by FC service name.
outputFile String
File name where to save data source results (after running pulumi preview).
ids string[]
A list of FC services ids.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by FC service name.
outputFile string
File name where to save data source results (after running pulumi preview).
ids Sequence[str]
A list of FC services ids.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by FC service name.
output_file str
File name where to save data source results (after running pulumi preview).
ids List<String>
A list of FC services ids.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by FC service name.
outputFile String
File name where to save data source results (after running pulumi preview).

getServices Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of FC services ids.
Names List<string>
A list of FC services names.
Services List<Pulumi.AliCloud.FC.Outputs.GetServicesService>
A list of FC services. Each element contains the following attributes:
NameRegex string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of FC services ids.
Names []string
A list of FC services names.
Services []GetServicesService
A list of FC services. Each element contains the following attributes:
NameRegex string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of FC services ids.
names List<String>
A list of FC services names.
services List<GetServicesService>
A list of FC services. Each element contains the following attributes:
nameRegex String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of FC services ids.
names string[]
A list of FC services names.
services GetServicesService[]
A list of FC services. Each element contains the following attributes:
nameRegex string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of FC services ids.
names Sequence[str]
A list of FC services names.
services Sequence[GetServicesService]
A list of FC services. Each element contains the following attributes:
name_regex str
output_file str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of FC services ids.
names List<String>
A list of FC services names.
services List<Property Map>
A list of FC services. Each element contains the following attributes:
nameRegex String
outputFile String

Supporting Types

GetServicesService

CreationTime This property is required. string
FC service creation time.
Description This property is required. string
FC service description.
Id This property is required. string
FC service ID.
InternetAccess This property is required. bool
Indicate whether the service can access to internet or not.
LastModificationTime This property is required. string
FC service last modification time.
LogConfig This property is required. Pulumi.AliCloud.FC.Inputs.GetServicesServiceLogConfig
A list of one element containing information about the associated log store. It contains the following attributes:
Name This property is required. string
FC service name.
NasConfig This property is required. Pulumi.AliCloud.FC.Inputs.GetServicesServiceNasConfig
A list of one element about the nas configuration.
Role This property is required. string
FC service role ARN.
VpcConfig This property is required. Pulumi.AliCloud.FC.Inputs.GetServicesServiceVpcConfig
A list of one element containing information about accessible VPC resources. It contains the following attributes:
CreationTime This property is required. string
FC service creation time.
Description This property is required. string
FC service description.
Id This property is required. string
FC service ID.
InternetAccess This property is required. bool
Indicate whether the service can access to internet or not.
LastModificationTime This property is required. string
FC service last modification time.
LogConfig This property is required. GetServicesServiceLogConfig
A list of one element containing information about the associated log store. It contains the following attributes:
Name This property is required. string
FC service name.
NasConfig This property is required. GetServicesServiceNasConfig
A list of one element about the nas configuration.
Role This property is required. string
FC service role ARN.
VpcConfig This property is required. GetServicesServiceVpcConfig
A list of one element containing information about accessible VPC resources. It contains the following attributes:
creationTime This property is required. String
FC service creation time.
description This property is required. String
FC service description.
id This property is required. String
FC service ID.
internetAccess This property is required. Boolean
Indicate whether the service can access to internet or not.
lastModificationTime This property is required. String
FC service last modification time.
logConfig This property is required. GetServicesServiceLogConfig
A list of one element containing information about the associated log store. It contains the following attributes:
name This property is required. String
FC service name.
nasConfig This property is required. GetServicesServiceNasConfig
A list of one element about the nas configuration.
role This property is required. String
FC service role ARN.
vpcConfig This property is required. GetServicesServiceVpcConfig
A list of one element containing information about accessible VPC resources. It contains the following attributes:
creationTime This property is required. string
FC service creation time.
description This property is required. string
FC service description.
id This property is required. string
FC service ID.
internetAccess This property is required. boolean
Indicate whether the service can access to internet or not.
lastModificationTime This property is required. string
FC service last modification time.
logConfig This property is required. GetServicesServiceLogConfig
A list of one element containing information about the associated log store. It contains the following attributes:
name This property is required. string
FC service name.
nasConfig This property is required. GetServicesServiceNasConfig
A list of one element about the nas configuration.
role This property is required. string
FC service role ARN.
vpcConfig This property is required. GetServicesServiceVpcConfig
A list of one element containing information about accessible VPC resources. It contains the following attributes:
creation_time This property is required. str
FC service creation time.
description This property is required. str
FC service description.
id This property is required. str
FC service ID.
internet_access This property is required. bool
Indicate whether the service can access to internet or not.
last_modification_time This property is required. str
FC service last modification time.
log_config This property is required. GetServicesServiceLogConfig
A list of one element containing information about the associated log store. It contains the following attributes:
name This property is required. str
FC service name.
nas_config This property is required. GetServicesServiceNasConfig
A list of one element about the nas configuration.
role This property is required. str
FC service role ARN.
vpc_config This property is required. GetServicesServiceVpcConfig
A list of one element containing information about accessible VPC resources. It contains the following attributes:
creationTime This property is required. String
FC service creation time.
description This property is required. String
FC service description.
id This property is required. String
FC service ID.
internetAccess This property is required. Boolean
Indicate whether the service can access to internet or not.
lastModificationTime This property is required. String
FC service last modification time.
logConfig This property is required. Property Map
A list of one element containing information about the associated log store. It contains the following attributes:
name This property is required. String
FC service name.
nasConfig This property is required. Property Map
A list of one element about the nas configuration.
role This property is required. String
FC service role ARN.
vpcConfig This property is required. Property Map
A list of one element containing information about accessible VPC resources. It contains the following attributes:

GetServicesServiceLogConfig

Logstore This property is required. string
Log Service store name.
Project This property is required. string
Log Service project name.
Logstore This property is required. string
Log Service store name.
Project This property is required. string
Log Service project name.
logstore This property is required. String
Log Service store name.
project This property is required. String
Log Service project name.
logstore This property is required. string
Log Service store name.
project This property is required. string
Log Service project name.
logstore This property is required. str
Log Service store name.
project This property is required. str
Log Service project name.
logstore This property is required. String
Log Service store name.
project This property is required. String
Log Service project name.

GetServicesServiceNasConfig

GroupId This property is required. int
The group id of the NAS file system.
MountPoints This property is required. List<Pulumi.AliCloud.FC.Inputs.GetServicesServiceNasConfigMountPoint>
The mount points configuration, including following attributes:
UserId This property is required. int
The user id of the NAS file system.
GroupId This property is required. int
The group id of the NAS file system.
MountPoints This property is required. []GetServicesServiceNasConfigMountPoint
The mount points configuration, including following attributes:
UserId This property is required. int
The user id of the NAS file system.
groupId This property is required. Integer
The group id of the NAS file system.
mountPoints This property is required. List<GetServicesServiceNasConfigMountPoint>
The mount points configuration, including following attributes:
userId This property is required. Integer
The user id of the NAS file system.
groupId This property is required. number
The group id of the NAS file system.
mountPoints This property is required. GetServicesServiceNasConfigMountPoint[]
The mount points configuration, including following attributes:
userId This property is required. number
The user id of the NAS file system.
group_id This property is required. int
The group id of the NAS file system.
mount_points This property is required. Sequence[GetServicesServiceNasConfigMountPoint]
The mount points configuration, including following attributes:
user_id This property is required. int
The user id of the NAS file system.
groupId This property is required. Number
The group id of the NAS file system.
mountPoints This property is required. List<Property Map>
The mount points configuration, including following attributes:
userId This property is required. Number
The user id of the NAS file system.

GetServicesServiceNasConfigMountPoint

MountDir This property is required. string
The local address where to mount your remote NAS directory.
ServerAddr This property is required. string
The address of the remote NAS directory.
MountDir This property is required. string
The local address where to mount your remote NAS directory.
ServerAddr This property is required. string
The address of the remote NAS directory.
mountDir This property is required. String
The local address where to mount your remote NAS directory.
serverAddr This property is required. String
The address of the remote NAS directory.
mountDir This property is required. string
The local address where to mount your remote NAS directory.
serverAddr This property is required. string
The address of the remote NAS directory.
mount_dir This property is required. str
The local address where to mount your remote NAS directory.
server_addr This property is required. str
The address of the remote NAS directory.
mountDir This property is required. String
The local address where to mount your remote NAS directory.
serverAddr This property is required. String
The address of the remote NAS directory.

GetServicesServiceVpcConfig

SecurityGroupId This property is required. string
Associated security group ID.
VpcId This property is required. string
Associated VPC ID.
VswitchIds This property is required. List<string>
Associated vSwitch IDs.
SecurityGroupId This property is required. string
Associated security group ID.
VpcId This property is required. string
Associated VPC ID.
VswitchIds This property is required. []string
Associated vSwitch IDs.
securityGroupId This property is required. String
Associated security group ID.
vpcId This property is required. String
Associated VPC ID.
vswitchIds This property is required. List<String>
Associated vSwitch IDs.
securityGroupId This property is required. string
Associated security group ID.
vpcId This property is required. string
Associated VPC ID.
vswitchIds This property is required. string[]
Associated vSwitch IDs.
security_group_id This property is required. str
Associated security group ID.
vpc_id This property is required. str
Associated VPC ID.
vswitch_ids This property is required. Sequence[str]
Associated vSwitch IDs.
securityGroupId This property is required. String
Associated security group ID.
vpcId This property is required. String
Associated VPC ID.
vswitchIds This property is required. List<String>
Associated vSwitch IDs.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi