1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. fc
  5. getServices
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.fc.getServices

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      fcServicesDs:
        fn::invoke:
          Function: alicloud:fc:getServices
          Arguments:
            nameRegex: sample_fc_service
    outputs:
      firstFcServiceName: ${fcServicesDs.services[0].name}
    

    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>
    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]
    func GetServices(ctx *Context, args *GetServicesArgs, opts ...InvokeOption) (*GetServicesResult, error)
    func GetServicesOutput(ctx *Context, args *GetServicesOutputArgs, opts ...InvokeOption) GetServicesResultOutput

    > 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)
    }
    public static CompletableFuture<GetServicesResult> getServices(GetServicesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:fc/getServices:getServices
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    GetServicesServiceLogConfig

    Logstore string
    Log Service store name.
    Project string
    Log Service project name.
    Logstore string
    Log Service store name.
    Project string
    Log Service project name.
    logstore String
    Log Service store name.
    project String
    Log Service project name.
    logstore string
    Log Service store name.
    project string
    Log Service project name.
    logstore str
    Log Service store name.
    project str
    Log Service project name.
    logstore String
    Log Service store name.
    project String
    Log Service project name.

    GetServicesServiceNasConfig

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

    GetServicesServiceNasConfigMountPoint

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

    GetServicesServiceVpcConfig

    SecurityGroupId string
    Associated security group ID.
    VpcId string
    Associated VPC ID.
    VswitchIds List<string>
    Associated VSwitch IDs.
    SecurityGroupId string
    Associated security group ID.
    VpcId string
    Associated VPC ID.
    VswitchIds []string
    Associated VSwitch IDs.
    securityGroupId String
    Associated security group ID.
    vpcId String
    Associated VPC ID.
    vswitchIds List<String>
    Associated VSwitch IDs.
    securityGroupId string
    Associated security group ID.
    vpcId string
    Associated VPC ID.
    vswitchIds string[]
    Associated VSwitch IDs.
    security_group_id str
    Associated security group ID.
    vpc_id str
    Associated VPC ID.
    vswitch_ids Sequence[str]
    Associated VSwitch IDs.
    securityGroupId String
    Associated security group ID.
    vpcId String
    Associated VPC ID.
    vswitchIds 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.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi