Service
This class encapsulates and extends the ROS resource type ALIYUN::FC::Service
, which is used to create a service in Function Compute.
Initializers
import ros_cdk_fc
ros_cdk_fc.Service(
scope: Construct,
id: str,
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,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No 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. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
service_name
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property serviceName: Service name.
deletion_force
Optional
- 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.
description
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property description: Service description.
internet_access
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property internetAccess: Set it to true to enable Internet access.
log_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, LogConfigProperty]
Property logConfig: Log configuration.
Function Compute pushes function execution logs to the configured log store.
nas_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, NasConfigProperty]
Property nasConfig: NAS configuration.
Function Compute uses a specified NAS configured on the service.
oss_mount_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, OssMountConfigProperty]
Property ossMountConfig: The OSS mount configurations.
role
Optional
- 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.
tags
Optional
- Type: 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_config
Optional
- Type: typing.Union[ros_cdk_core.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_bindings
Optional
- 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_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, VpcConfigProperty]
Property vpcConfig: VPC configuration.
Function Compute uses the config to setup ENI in the specific VPC.
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_fc
ros_cdk_fc.Service.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_internet_access |
ros_cdk_core.IResolvable |
Attribute InternetAccess: Whether enable Internet access. |
attr_log_project |
ros_cdk_core.IResolvable |
Attribute LogProject: Log project of service. |
attr_logstore |
ros_cdk_core.IResolvable |
Attribute Logstore: Log store of service. |
attr_role |
ros_cdk_core.IResolvable |
Attribute Role: Role of service. |
attr_service_id |
ros_cdk_core.IResolvable |
Attribute ServiceId: The service ID. |
attr_service_name |
ros_cdk_core.IResolvable |
Attribute ServiceName: The service name. |
attr_tags |
ros_cdk_core.IResolvable |
Attribute Tags: Tags of service. |
attr_vpc_id |
ros_cdk_core.IResolvable |
Attribute VpcId: VPC ID. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_internet_access
Required
attr_internet_access: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InternetAccess: Whether enable Internet access.
attr_log_project
Required
attr_log_project: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LogProject: Log project of service.
attr_logstore
Required
attr_logstore: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Logstore: Log store of service.
attr_role
Required
attr_role: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Role: Role of service.
attr_service_id
Required
attr_service_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ServiceId: The service ID.
attr_service_name
Required
attr_service_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ServiceName: The service name.
attr_tags
Required
attr_tags: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Tags: Tags of service.
attr_vpc_id
Required
attr_vpc_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute VpcId: VPC ID.