Module fc

This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-alicloud repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-alicloud repo.

Resources

Functions

Others

Resources

Resource Function

class Function extends CustomResource

constructor

new Function(name: string, args: FunctionArgs, opts?: pulumi.CustomResourceOptions)

Create a Function resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FunctionState, opts?: pulumi.CustomResourceOptions): Function

Get an existing Function resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Function

Returns true if the given object is an instance of Function. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property codeChecksum

public codeChecksum: pulumi.Output<string>;

The checksum (crc64) of the function code.

property description

public description: pulumi.Output<string | undefined>;

The Function Compute function description.

property environmentVariables

public environmentVariables: pulumi.Output<{[key: string]: any} | undefined>;

A map that defines environment variables for the function.

property filename

public filename: pulumi.Output<string | undefined>;

The path to the function’s deployment package within the local filesystem. It is conflict with the oss_-prefixed options.

property functionId

public functionId: pulumi.Output<string>;

The Function Compute service ID.

property handler

public handler: pulumi.Output<string>;

The function entry point in your code.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lastModified

public lastModified: pulumi.Output<string>;

The date this resource was last modified.

property memorySize

public memorySize: pulumi.Output<number | undefined>;

Amount of memory in MB your Function can use at runtime. Defaults to 128. Limits to [128, 3072].

property name

public name: pulumi.Output<string>;

The Function Compute function name. It is the only in one service and is conflict with “namePrefix”.

property namePrefix

public namePrefix: pulumi.Output<string | undefined>;

Setting a prefix to get a only function name. It is conflict with “name”.

property ossBucket

public ossBucket: pulumi.Output<string | undefined>;

The OSS bucket location containing the function’s deployment package. Conflicts with filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.

property ossKey

public ossKey: pulumi.Output<string | undefined>;

The OSS key of an object containing the function’s deployment package. Conflicts with filename.

property runtime

public runtime: pulumi.Output<string>;

See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.

property service

public service: pulumi.Output<string>;

The Function Compute service name.

property timeout

public timeout: pulumi.Output<number | undefined>;

The amount of time your Function has to run in seconds.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Service

class Service extends CustomResource

constructor

new Service(name: string, args?: ServiceArgs, opts?: pulumi.CustomResourceOptions)

Create a Service resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceState, opts?: pulumi.CustomResourceOptions): Service

Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Service

Returns true if the given object is an instance of Service. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property description

public description: pulumi.Output<string | undefined>;

The function compute service description.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property internetAccess

public internetAccess: pulumi.Output<boolean | undefined>;

Whether to allow the service to access Internet. Default to “true”.

property lastModified

public lastModified: pulumi.Output<string>;

The date this resource was last modified.

property logConfig

public logConfig: pulumi.Output<ServiceLogConfig | undefined>;

Provide this to store your FC service logs. Fields documented below. See Create a Service.

property name

public name: pulumi.Output<string>;

The Function Compute service name. It is the only in one Alicloud account and is conflict with “namePrefix”.

property namePrefix

public namePrefix: pulumi.Output<string | undefined>;

Setting a prefix to get a only name. It is conflict with “name”.

property role

public role: pulumi.Output<string | undefined>;

RAM role arn attached to the Function Compute service. This governs both who / what can invoke your Function, as well as what resources our Function has access to. See User Permissions for more details.

property serviceId

public serviceId: pulumi.Output<string>;

The Function Compute service ID.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property vpcConfig

public vpcConfig: pulumi.Output<ServiceVpcConfig | undefined>;

Provide this to allow your FC service to access your VPC. Fields documented below. See Function Compute Service in VPC.

Resource Trigger

class Trigger extends CustomResource

constructor

new Trigger(name: string, args: TriggerArgs, opts?: pulumi.CustomResourceOptions)

Create a Trigger resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TriggerState, opts?: pulumi.CustomResourceOptions): Trigger

Get an existing Trigger resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Trigger

Returns true if the given object is an instance of Trigger. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property config

public config: pulumi.Output<string | undefined>;

The config of Function Compute trigger.It is valid when type is not “mnsTopic”.See Configure triggers and events for more details.

property configMns

public configMns: pulumi.Output<string | undefined>;

The config of Function Compute trigger when the type is “mnsTopic”.It is conflict with config.

property function

public function: pulumi.Output<string>;

The Function Compute function name.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lastModified

public lastModified: pulumi.Output<string>;

The date this resource was last modified.

property name

public name: pulumi.Output<string>;

The Function Compute trigger name. It is the only in one service and is conflict with “namePrefix”.

property namePrefix

public namePrefix: pulumi.Output<string | undefined>;

Setting a prefix to get a only trigger name. It is conflict with “name”.

property role

public role: pulumi.Output<string | undefined>;

RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is “acs:ram::$account-id:role/$role-name”. See Create a trigger for more details.

property service

public service: pulumi.Output<string>;

The Function Compute service name.

property sourceArn

public sourceArn: pulumi.Output<string | undefined>;

Event source resource address. See Create a trigger for more details.

property triggerId

public triggerId: pulumi.Output<string>;

The Function Compute trigger ID.

property type

public type: pulumi.Output<string>;

The Type of the trigger. Valid values: [“oss”, “log”, “timer”, “http”, “mnsTopic”, “cdnEvents”].

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Functions

Function getFunctions

getFunctions(args: GetFunctionsArgs, opts?: pulumi.InvokeOptions): Promise<GetFunctionsResult>

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

Example Usage

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

const functionsDs = pulumi.output(alicloud.fc.getFunctions({
    nameRegex: "sampleFcFunction",
    serviceName: "sampleService",
}, { async: true }));

export const firstFcFunctionName = functionsDs.functions[0].name;

Function getServices

getServices(args?: GetServicesArgs, opts?: pulumi.InvokeOptions): Promise<GetServicesResult>

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 = pulumi.output(alicloud.fc.getServices({
    nameRegex: "sampleFcService",
}, { async: true }));

export const firstFcServiceName = fcServicesDs.services[0].name;

Function getTriggers

getTriggers(args: GetTriggersArgs, opts?: pulumi.InvokeOptions): Promise<GetTriggersResult>

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

Example Usage

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

const fcTriggersDs = pulumi.output(alicloud.fc.getTriggers({
    functionName: "sampleFunction",
    nameRegex: "sampleFcTrigger",
    serviceName: "sampleService",
}, { async: true }));

export const firstFcTriggerName = fcTriggersDs.triggers[0].name;

Function getZones

getZones(args?: GetZonesArgs, opts?: pulumi.InvokeOptions): Promise<GetZonesResult>

This data source provides availability zones for FunctionCompute that can be accessed by an Alibaba Cloud account within the region configured in the provider.

NOTE: Available in v1.74.0+.

Example Usage

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

// Declare the data source
const zonesIds = pulumi.output(alicloud.fc.getZones({ async: true }));

Others

interface FunctionArgs

interface FunctionArgs

The set of arguments for constructing a Function resource.

property codeChecksum

codeChecksum?: pulumi.Input<string>;

The checksum (crc64) of the function code.

property description

description?: pulumi.Input<string>;

The Function Compute function description.

property environmentVariables

environmentVariables?: pulumi.Input<{[key: string]: any}>;

A map that defines environment variables for the function.

property filename

filename?: pulumi.Input<string>;

The path to the function’s deployment package within the local filesystem. It is conflict with the oss_-prefixed options.

property handler

handler: pulumi.Input<string>;

The function entry point in your code.

property memorySize

memorySize?: pulumi.Input<number>;

Amount of memory in MB your Function can use at runtime. Defaults to 128. Limits to [128, 3072].

property name

name?: pulumi.Input<string>;

The Function Compute function name. It is the only in one service and is conflict with “namePrefix”.

property namePrefix

namePrefix?: pulumi.Input<string>;

Setting a prefix to get a only function name. It is conflict with “name”.

property ossBucket

ossBucket?: pulumi.Input<string>;

The OSS bucket location containing the function’s deployment package. Conflicts with filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.

property ossKey

ossKey?: pulumi.Input<string>;

The OSS key of an object containing the function’s deployment package. Conflicts with filename.

property runtime

runtime: pulumi.Input<string>;

See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.

property service

service: pulumi.Input<string>;

The Function Compute service name.

property timeout

timeout?: pulumi.Input<number>;

The amount of time your Function has to run in seconds.

interface FunctionState

interface FunctionState

Input properties used for looking up and filtering Function resources.

property codeChecksum

codeChecksum?: pulumi.Input<string>;

The checksum (crc64) of the function code.

property description

description?: pulumi.Input<string>;

The Function Compute function description.

property environmentVariables

environmentVariables?: pulumi.Input<{[key: string]: any}>;

A map that defines environment variables for the function.

property filename

filename?: pulumi.Input<string>;

The path to the function’s deployment package within the local filesystem. It is conflict with the oss_-prefixed options.

property functionId

functionId?: pulumi.Input<string>;

The Function Compute service ID.

property handler

handler?: pulumi.Input<string>;

The function entry point in your code.

property lastModified

lastModified?: pulumi.Input<string>;

The date this resource was last modified.

property memorySize

memorySize?: pulumi.Input<number>;

Amount of memory in MB your Function can use at runtime. Defaults to 128. Limits to [128, 3072].

property name

name?: pulumi.Input<string>;

The Function Compute function name. It is the only in one service and is conflict with “namePrefix”.

property namePrefix

namePrefix?: pulumi.Input<string>;

Setting a prefix to get a only function name. It is conflict with “name”.

property ossBucket

ossBucket?: pulumi.Input<string>;

The OSS bucket location containing the function’s deployment package. Conflicts with filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.

property ossKey

ossKey?: pulumi.Input<string>;

The OSS key of an object containing the function’s deployment package. Conflicts with filename.

property runtime

runtime?: pulumi.Input<string>;

See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.

property service

service?: pulumi.Input<string>;

The Function Compute service name.

property timeout

timeout?: pulumi.Input<number>;

The amount of time your Function has to run in seconds.

interface GetFunctionsArgs

interface GetFunctionsArgs

A collection of arguments for invoking getFunctions.

property ids

ids?: string[];
  • A list of functions ids.

property nameRegex

nameRegex?: undefined | string;

A regex string to filter results by function name.

property outputFile

outputFile?: undefined | string;

property serviceName

serviceName: string;

Name of the service that contains the functions to find.

interface GetFunctionsResult

interface GetFunctionsResult

A collection of values returned by getFunctions.

property functions

functions: GetFunctionsFunction[];

A list of functions. Each element contains the following attributes:

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of functions ids.

property nameRegex

nameRegex?: undefined | string;

property names

names: string[];

A list of functions names.

property outputFile

outputFile?: undefined | string;

property serviceName

serviceName: string;

interface GetServicesArgs

interface GetServicesArgs

A collection of arguments for invoking getServices.

property ids

ids?: string[];
  • A list of FC services ids.

property nameRegex

nameRegex?: undefined | string;

A regex string to filter results by FC service name.

property outputFile

outputFile?: undefined | string;

interface GetServicesResult

interface GetServicesResult

A collection of values returned by getServices.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of FC services ids.

property nameRegex

nameRegex?: undefined | string;

property names

names: string[];

A list of FC services names.

property outputFile

outputFile?: undefined | string;

property services

services: GetServicesService[];

A list of FC services. Each element contains the following attributes:

interface GetTriggersArgs

interface GetTriggersArgs

A collection of arguments for invoking getTriggers.

property functionName

functionName: string;

FC function name.

property ids

ids?: string[];
  • A list of FC triggers ids.

property nameRegex

nameRegex?: undefined | string;

A regex string to filter results by FC trigger name.

property outputFile

outputFile?: undefined | string;

property serviceName

serviceName: string;

FC service name.

interface GetTriggersResult

interface GetTriggersResult

A collection of values returned by getTriggers.

property functionName

functionName: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of FC triggers ids.

property nameRegex

nameRegex?: undefined | string;

property names

names: string[];

A list of FC triggers names.

property outputFile

outputFile?: undefined | string;

property serviceName

serviceName: string;

property triggers

triggers: GetTriggersTrigger[];

A list of FC triggers. Each element contains the following attributes:

interface GetZonesArgs

interface GetZonesArgs

A collection of arguments for invoking getZones.

property outputFile

outputFile?: undefined | string;

interface GetZonesResult

interface GetZonesResult

A collection of values returned by getZones.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of zone IDs.

property outputFile

outputFile?: undefined | string;

property zones

zones: GetZonesZone[];

A list of availability zones. Each element contains the following attributes:

interface ServiceArgs

interface ServiceArgs

The set of arguments for constructing a Service resource.

property description

description?: pulumi.Input<string>;

The function compute service description.

property internetAccess

internetAccess?: pulumi.Input<boolean>;

Whether to allow the service to access Internet. Default to “true”.

property logConfig

logConfig?: pulumi.Input<ServiceLogConfig>;

Provide this to store your FC service logs. Fields documented below. See Create a Service.

property name

name?: pulumi.Input<string>;

The Function Compute service name. It is the only in one Alicloud account and is conflict with “namePrefix”.

property namePrefix

namePrefix?: pulumi.Input<string>;

Setting a prefix to get a only name. It is conflict with “name”.

property role

role?: pulumi.Input<string>;

RAM role arn attached to the Function Compute service. This governs both who / what can invoke your Function, as well as what resources our Function has access to. See User Permissions for more details.

property vpcConfig

vpcConfig?: pulumi.Input<ServiceVpcConfig>;

Provide this to allow your FC service to access your VPC. Fields documented below. See Function Compute Service in VPC.

interface ServiceState

interface ServiceState

Input properties used for looking up and filtering Service resources.

property description

description?: pulumi.Input<string>;

The function compute service description.

property internetAccess

internetAccess?: pulumi.Input<boolean>;

Whether to allow the service to access Internet. Default to “true”.

property lastModified

lastModified?: pulumi.Input<string>;

The date this resource was last modified.

property logConfig

logConfig?: pulumi.Input<ServiceLogConfig>;

Provide this to store your FC service logs. Fields documented below. See Create a Service.

property name

name?: pulumi.Input<string>;

The Function Compute service name. It is the only in one Alicloud account and is conflict with “namePrefix”.

property namePrefix

namePrefix?: pulumi.Input<string>;

Setting a prefix to get a only name. It is conflict with “name”.

property role

role?: pulumi.Input<string>;

RAM role arn attached to the Function Compute service. This governs both who / what can invoke your Function, as well as what resources our Function has access to. See User Permissions for more details.

property serviceId

serviceId?: pulumi.Input<string>;

The Function Compute service ID.

property vpcConfig

vpcConfig?: pulumi.Input<ServiceVpcConfig>;

Provide this to allow your FC service to access your VPC. Fields documented below. See Function Compute Service in VPC.

interface TriggerArgs

interface TriggerArgs

The set of arguments for constructing a Trigger resource.

property config

config?: pulumi.Input<string>;

The config of Function Compute trigger.It is valid when type is not “mnsTopic”.See Configure triggers and events for more details.

property configMns

configMns?: pulumi.Input<string>;

The config of Function Compute trigger when the type is “mnsTopic”.It is conflict with config.

property function

function: pulumi.Input<string>;

The Function Compute function name.

property name

name?: pulumi.Input<string>;

The Function Compute trigger name. It is the only in one service and is conflict with “namePrefix”.

property namePrefix

namePrefix?: pulumi.Input<string>;

Setting a prefix to get a only trigger name. It is conflict with “name”.

property role

role?: pulumi.Input<string>;

RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is “acs:ram::$account-id:role/$role-name”. See Create a trigger for more details.

property service

service: pulumi.Input<string>;

The Function Compute service name.

property sourceArn

sourceArn?: pulumi.Input<string>;

Event source resource address. See Create a trigger for more details.

property type

type: pulumi.Input<string>;

The Type of the trigger. Valid values: [“oss”, “log”, “timer”, “http”, “mnsTopic”, “cdnEvents”].

interface TriggerState

interface TriggerState

Input properties used for looking up and filtering Trigger resources.

property config

config?: pulumi.Input<string>;

The config of Function Compute trigger.It is valid when type is not “mnsTopic”.See Configure triggers and events for more details.

property configMns

configMns?: pulumi.Input<string>;

The config of Function Compute trigger when the type is “mnsTopic”.It is conflict with config.

property function

function?: pulumi.Input<string>;

The Function Compute function name.

property lastModified

lastModified?: pulumi.Input<string>;

The date this resource was last modified.

property name

name?: pulumi.Input<string>;

The Function Compute trigger name. It is the only in one service and is conflict with “namePrefix”.

property namePrefix

namePrefix?: pulumi.Input<string>;

Setting a prefix to get a only trigger name. It is conflict with “name”.

property role

role?: pulumi.Input<string>;

RAM role arn attached to the Function Compute trigger. Role used by the event source to call the function. The value format is “acs:ram::$account-id:role/$role-name”. See Create a trigger for more details.

property service

service?: pulumi.Input<string>;

The Function Compute service name.

property sourceArn

sourceArn?: pulumi.Input<string>;

Event source resource address. See Create a trigger for more details.

property triggerId

triggerId?: pulumi.Input<string>;

The Function Compute trigger ID.

property type

type?: pulumi.Input<string>;

The Type of the trigger. Valid values: [“oss”, “log”, “timer”, “http”, “mnsTopic”, “cdnEvents”].