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.

fc

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.

class pulumi_alicloud.fc.AwaitableGetFunctionsResult(functions=None, id=None, ids=None, name_regex=None, names=None, output_file=None, service_name=None)
class pulumi_alicloud.fc.AwaitableGetServicesResult(id=None, ids=None, name_regex=None, names=None, output_file=None, services=None)
class pulumi_alicloud.fc.AwaitableGetTriggersResult(function_name=None, id=None, ids=None, name_regex=None, names=None, output_file=None, service_name=None, triggers=None)
class pulumi_alicloud.fc.AwaitableGetZonesResult(id=None, ids=None, output_file=None, zones=None)
class pulumi_alicloud.fc.Function(resource_name, opts=None, code_checksum=None, description=None, environment_variables=None, filename=None, handler=None, memory_size=None, name=None, name_prefix=None, oss_bucket=None, oss_key=None, runtime=None, service=None, timeout=None, __props__=None, __name__=None, __opts__=None)

Create a Function resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] code_checksum: The checksum (crc64) of the function code. :param pulumi.Input[str] description: The Function Compute function description. :param pulumi.Input[dict] environmentvariables: A map that defines environment variables for the function. :param pulumi.Input[str] filename: The path to the function’s deployment package within the local filesystem. It is conflict with the `oss-prefixed options. :param pulumi.Input[str] handler: The function [entry point](https://www.alibabacloud.com/help/doc-detail/62213.htm) in your code. :param pulumi.Input[float] memory_size: Amount of memory in MB your Function can use at runtime. Defaults to128. Limits to [128, 3072]. :param pulumi.Input[str] name: The Function Compute function name. It is the only in one service and is conflict with "name_prefix". :param pulumi.Input[str] name_prefix: Setting a prefix to get a only function name. It is conflict with "name". :param pulumi.Input[str] oss_bucket: The OSS bucket location containing the function's deployment package. Conflicts withfilename. This bucket must reside in the same Alibaba Cloud region where you are creating the function. :param pulumi.Input[str] oss_key: The OSS key of an object containing the function's deployment package. Conflicts withfilename`. :param pulumi.Input[str] runtime: See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values. :param pulumi.Input[str] service: The Function Compute service name. :param pulumi.Input[float] timeout: The amount of time your Function has to run in seconds.

code_checksum: pulumi.Output[str] = None

The checksum (crc64) of the function code.

description: pulumi.Output[str] = None

The Function Compute function description.

environment_variables: pulumi.Output[dict] = None

A map that defines environment variables for the function.

filename: pulumi.Output[str] = None

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

function_id: pulumi.Output[str] = None

The Function Compute service ID.

handler: pulumi.Output[str] = None

The function entry point in your code.

last_modified: pulumi.Output[str] = None

The date this resource was last modified.

memory_size: pulumi.Output[float] = None

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

name: pulumi.Output[str] = None

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

name_prefix: pulumi.Output[str] = None

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

oss_bucket: pulumi.Output[str] = None

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.

oss_key: pulumi.Output[str] = None

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

runtime: pulumi.Output[str] = None

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

service: pulumi.Output[str] = None

The Function Compute service name.

timeout: pulumi.Output[float] = None

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

static get(resource_name, id, opts=None, code_checksum=None, description=None, environment_variables=None, filename=None, function_id=None, handler=None, last_modified=None, memory_size=None, name=None, name_prefix=None, oss_bucket=None, oss_key=None, runtime=None, service=None, timeout=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • code_checksum (pulumi.Input[str]) – The checksum (crc64) of the function code.

  • description (pulumi.Input[str]) – The Function Compute function description.

  • environment*variables (pulumi.Input[dict]) –

    A map that defines environment variables for the function.

  • filename (pulumi.Input[str]) – The path to the function’s deployment package within the local filesystem. It is conflict with the oss*`-prefixed options.

  • function_id (pulumi.Input[str]) – The Function Compute service ID.

  • handler (pulumi.Input[str]) – The function [entry point](https://www.alibabacloud.com/help/doc-detail/62213.htm) in your code.

  • last_modified (pulumi.Input[str]) – The date this resource was last modified.

  • memory_size (pulumi.Input[float]) – Amount of memory in MB your Function can use at runtime. Defaults to``128``. Limits to [128, 3072].

  • name (pulumi.Input[str]) – The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.

  • name_prefix (pulumi.Input[str]) – Setting a prefix to get a only function name. It is conflict with “name”.

  • oss_bucket (pulumi.Input[str]) – 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.

  • oss_key (pulumi.Input[str]) – The OSS key of an object containing the function’s deployment package. Conflicts with``filename`.

  • runtime (pulumi.Input[str]) – See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.

  • service (pulumi.Input[str]) – The Function Compute service name.

  • timeout (pulumi.Input[float]) – The amount of time your Function has to run in seconds.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_alicloud.fc.GetFunctionsResult(functions=None, id=None, ids=None, name_regex=None, names=None, output_file=None, service_name=None)

A collection of values returned by getFunctions.

functions = None

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

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A list of functions ids.

names = None

A list of functions names.

class pulumi_alicloud.fc.GetServicesResult(id=None, ids=None, name_regex=None, names=None, output_file=None, services=None)

A collection of values returned by getServices.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A list of FC services ids.

names = None

A list of FC services names.

services = None

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

class pulumi_alicloud.fc.GetTriggersResult(function_name=None, id=None, ids=None, name_regex=None, names=None, output_file=None, service_name=None, triggers=None)

A collection of values returned by getTriggers.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A list of FC triggers ids.

names = None

A list of FC triggers names.

triggers = None

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

class pulumi_alicloud.fc.GetZonesResult(id=None, ids=None, output_file=None, zones=None)

A collection of values returned by getZones.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A list of zone IDs.

zones = None

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

class pulumi_alicloud.fc.Service(resource_name, opts=None, description=None, internet_access=None, log_config=None, name=None, name_prefix=None, role=None, vpc_config=None, __props__=None, __name__=None, __opts__=None)

Create a Service resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] description: The function compute service description. :param pulumi.Input[bool] internet_access: Whether to allow the service to access Internet. Default to “true”. :param pulumi.Input[dict] log_config: Provide this to store your FC service logs. Fields documented below. See Create a Service. :param pulumi.Input[str] name: The Function Compute service name. It is the only in one Alicloud account and is conflict with “name_prefix”. :param pulumi.Input[str] name_prefix: Setting a prefix to get a only name. It is conflict with “name”. :param pulumi.Input[str] role: 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. :param pulumi.Input[dict] vpc_config: Provide this to allow your FC service to access your VPC. Fields documented below. See Function Compute Service in VPC.

The log_config object supports the following:

  • logstore (pulumi.Input[str]) - The log store name of Logs service.

  • project (pulumi.Input[str]) - The project name of Logs service.

The vpc_config object supports the following:

  • security_group_id (pulumi.Input[str]) - A security group ID associated with the FC service.

  • vpc_id (pulumi.Input[str])

  • vswitch_ids (pulumi.Input[list]) - A list of vswitch IDs associated with the FC service.

description: pulumi.Output[str] = None

The function compute service description.

internet_access: pulumi.Output[bool] = None

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

last_modified: pulumi.Output[str] = None

The date this resource was last modified.

log_config: pulumi.Output[dict] = None

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

  • logstore (str) - The log store name of Logs service.

  • project (str) - The project name of Logs service.

name: pulumi.Output[str] = None

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

name_prefix: pulumi.Output[str] = None

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

role: pulumi.Output[str] = None

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.

service_id: pulumi.Output[str] = None

The Function Compute service ID.

vpc_config: pulumi.Output[dict] = None

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

  • security_group_id (str) - A security group ID associated with the FC service.

  • vpc_id (str)

  • vswitch_ids (list) - A list of vswitch IDs associated with the FC service.

static get(resource_name, id, opts=None, description=None, internet_access=None, last_modified=None, log_config=None, name=None, name_prefix=None, role=None, service_id=None, vpc_config=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – The function compute service description.

  • internet_access (pulumi.Input[bool]) – Whether to allow the service to access Internet. Default to “true”.

  • last_modified (pulumi.Input[str]) – The date this resource was last modified.

  • log_config (pulumi.Input[dict]) –

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

  • name (pulumi.Input[str]) – The Function Compute service name. It is the only in one Alicloud account and is conflict with “name_prefix”.

  • name_prefix (pulumi.Input[str]) – Setting a prefix to get a only name. It is conflict with “name”.

  • role (pulumi.Input[str]) –

    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.

  • service_id (pulumi.Input[str]) – The Function Compute service ID.

  • vpc_config (pulumi.Input[dict]) –

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

The log_config object supports the following:

  • logstore (pulumi.Input[str]) - The log store name of Logs service.

  • project (pulumi.Input[str]) - The project name of Logs service.

The vpc_config object supports the following:

  • security_group_id (pulumi.Input[str]) - A security group ID associated with the FC service.

  • vpc_id (pulumi.Input[str])

  • vswitch_ids (pulumi.Input[list]) - A list of vswitch IDs associated with the FC service.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_alicloud.fc.Trigger(resource_name, opts=None, config=None, config_mns=None, function=None, name=None, name_prefix=None, role=None, service=None, source_arn=None, type=None, __props__=None, __name__=None, __opts__=None)

Create a Trigger resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] config: The config of Function Compute trigger.It is valid when type is not “mns_topic”.See Configure triggers and events for more details. :param pulumi.Input[str] config_mns: The config of Function Compute trigger when the type is “mns_topic”.It is conflict with config. :param pulumi.Input[str] function: The Function Compute function name. :param pulumi.Input[str] name: The Function Compute trigger name. It is the only in one service and is conflict with “name_prefix”. :param pulumi.Input[str] name_prefix: Setting a prefix to get a only trigger name. It is conflict with “name”. :param pulumi.Input[str] role: 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. :param pulumi.Input[str] service: The Function Compute service name. :param pulumi.Input[str] source_arn: Event source resource address. See Create a trigger for more details. :param pulumi.Input[str] type: The Type of the trigger. Valid values: [“oss”, “log”, “timer”, “http”, “mns_topic”, “cdn_events”].

config: pulumi.Output[str] = None

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

config_mns: pulumi.Output[str] = None

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

function: pulumi.Output[str] = None

The Function Compute function name.

last_modified: pulumi.Output[str] = None

The date this resource was last modified.

name: pulumi.Output[str] = None

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

name_prefix: pulumi.Output[str] = None

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

role: pulumi.Output[str] = None

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.

service: pulumi.Output[str] = None

The Function Compute service name.

source_arn: pulumi.Output[str] = None

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

trigger_id: pulumi.Output[str] = None

The Function Compute trigger ID.

type: pulumi.Output[str] = None

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

static get(resource_name, id, opts=None, config=None, config_mns=None, function=None, last_modified=None, name=None, name_prefix=None, role=None, service=None, source_arn=None, trigger_id=None, type=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • config (pulumi.Input[str]) –

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

  • config_mns (pulumi.Input[str]) – The config of Function Compute trigger when the type is “mns_topic”.It is conflict with config.

  • function (pulumi.Input[str]) – The Function Compute function name.

  • last_modified (pulumi.Input[str]) – The date this resource was last modified.

  • name (pulumi.Input[str]) – The Function Compute trigger name. It is the only in one service and is conflict with “name_prefix”.

  • name_prefix (pulumi.Input[str]) – Setting a prefix to get a only trigger name. It is conflict with “name”.

  • role (pulumi.Input[str]) –

    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.

  • service (pulumi.Input[str]) – The Function Compute service name.

  • source_arn (pulumi.Input[str]) –

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

  • trigger_id (pulumi.Input[str]) – The Function Compute trigger ID.

  • type (pulumi.Input[str]) – The Type of the trigger. Valid values: [“oss”, “log”, “timer”, “http”, “mns_topic”, “cdn_events”].

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_alicloud.fc.get_functions(ids=None, name_regex=None, output_file=None, service_name=None, opts=None)

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

import pulumi
import pulumi_alicloud as alicloud

functions_ds = alicloud.fc.get_functions(name_regex="sample_fc_function",
    service_name="sample_service")
pulumi.export("firstFcFunctionName", functions_ds.functions[0]["name"])
Parameters
  • ids (list) –

    • A list of functions ids.

  • name_regex (str) – A regex string to filter results by function name.

  • service_name (str) – Name of the service that contains the functions to find.

pulumi_alicloud.fc.get_services(ids=None, name_regex=None, output_file=None, opts=None)

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

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"])
Parameters
  • ids (list) –

    • A list of FC services ids.

  • name_regex (str) – A regex string to filter results by FC service name.

pulumi_alicloud.fc.get_triggers(function_name=None, ids=None, name_regex=None, output_file=None, service_name=None, opts=None)

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

import pulumi
import pulumi_alicloud as alicloud

fc_triggers_ds = alicloud.fc.get_triggers(function_name="sample_function",
    name_regex="sample_fc_trigger",
    service_name="sample_service")
pulumi.export("firstFcTriggerName", fc_triggers_ds.triggers[0]["name"])
Parameters
  • function_name (str) – FC function name.

  • ids (list) –

    • A list of FC triggers ids.

  • name_regex (str) – A regex string to filter results by FC trigger name.

  • service_name (str) – FC service name.

pulumi_alicloud.fc.get_zones(output_file=None, opts=None)

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+.

import pulumi
import pulumi_alicloud as alicloud

zones_ids = alicloud.fc.get_zones()