Skip to content

ServiceProps

Properties for defining a Service.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-fc-service

Initializer

import ros_cdk_fc
ros_cdk_fc.ServiceProps(
  service_name: typing.Union[str, IResolvable],
  deletion_force: typing.Union[bool, IResolvable] = None,
  description: typing.Union[str, IResolvable] = None,
  internet_access: typing.Union[bool, IResolvable] = None,
  log_config: typing.Union[IResolvable, LogConfigProperty] = None,
  nas_config: typing.Union[IResolvable, NasConfigProperty] = None,
  oss_mount_config: typing.Union[IResolvable, OssMountConfigProperty] = None,
  role: typing.Union[str, IResolvable] = None,
  tags: typing.List[TagsProperty] = None,
  tracing_config: typing.Union[IResolvable, TracingConfigProperty] = None,
  vpc_bindings: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
  vpc_config: typing.Union[IResolvable, VpcConfigProperty] = None
)

Properties

Name Type Description
service_name typing.Union[str, ros_cdk_core.IResolvable] Property serviceName: Service name.
deletion_force typing.Union[bool, ros_cdk_core.IResolvable] Property deletionForce: Whether force delete the service without waiting for network interfaces to be cleaned up if VpcConfig is specified.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: Service description.
internet_access typing.Union[bool, ros_cdk_core.IResolvable] Property internetAccess: Set it to true to enable Internet access.
log_config typing.Union[ros_cdk_core.IResolvable, LogConfigProperty] Property logConfig: Log configuration.
nas_config typing.Union[ros_cdk_core.IResolvable, NasConfigProperty] Property nasConfig: NAS configuration.
oss_mount_config typing.Union[ros_cdk_core.IResolvable, OssMountConfigProperty] Property ossMountConfig: The OSS mount configurations.
role typing.Union[str, ros_cdk_core.IResolvable] Property role: The role grants Function Compute the permission to access user’s cloud resources, such as pushing logs to user’s log store.
tags typing.List[TagsProperty] Property tags: Tags to attach to service.
tracing_config typing.Union[ros_cdk_core.IResolvable, TracingConfigProperty] Property tracingConfig: The Tracing Analysis configuration.
vpc_bindings typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] Property vpcBindings: Function Invocation only by Specified VPCs.
vpc_config typing.Union[ros_cdk_core.IResolvable, VpcConfigProperty] Property vpcConfig: VPC configuration.

service_nameRequired

service_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property serviceName: Service name.


deletion_forceOptional

deletion_force: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property deletionForce: Whether force delete the service without waiting for network interfaces to be cleaned up if VpcConfig is specified.

Default value is false.


descriptionOptional

description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: Service description.


internet_accessOptional

internet_access: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property internetAccess: Set it to true to enable Internet access.


log_configOptional

log_config: typing.Union[IResolvable, LogConfigProperty]

Property logConfig: Log configuration.

Function Compute pushes function execution logs to the configured log store.


nas_configOptional

nas_config: typing.Union[IResolvable, NasConfigProperty]

Property nasConfig: NAS configuration.

Function Compute uses a specified NAS configured on the service.


oss_mount_configOptional

oss_mount_config: typing.Union[IResolvable, OssMountConfigProperty]

Property ossMountConfig: The OSS mount configurations.


roleOptional

role: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property role: The role grants Function Compute the permission to access user’s cloud resources, such as pushing logs to user’s log store.

The temporary STS token generated from this role can be retrieved from function context and used to access cloud resources.


tagsOptional

tags: typing.List[TagsProperty]

Property tags: Tags to attach to service.

Max support 20 tags to add during create service. Each tag with two properties Key and Value, and Key is required.


tracing_configOptional

tracing_config: typing.Union[IResolvable, TracingConfigProperty]

Property tracingConfig: The Tracing Analysis configuration.

After Function Compute integrates with Tracing Analysis, you can record the stay time of a request in Function Compute, view the cold start time for a function, and record the execution time of a function.


vpc_bindingsOptional

vpc_bindings: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]

Property vpcBindings: Function Invocation only by Specified VPCs.

By default, you can invoke the function by using the Internet endpoint and internal endpoint after a function is created. If you want the function to be invoked only by using specified VPCs, but not the Internet endpoint or internal endpoint, you must bind the specified VPCs to the service.


vpc_configOptional

vpc_config: typing.Union[IResolvable, VpcConfigProperty]

Property vpcConfig: VPC configuration.

Function Compute uses the config to setup ENI in the specific VPC.