Skip to content

Function

This class encapsulates and extends the ROS resource type ALIYUN::FC::Function, which is used to create a function.

Functions must be associated with services. All functions of a service share the same attributes as the service, such as service authorization and log configurations.

Initializers

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkfc"
alicloudroscdkfc.NewFunction(scope Construct, id *string, props FunctionProps, enableResourcePropertyConstraint *bool) Function
Name Type Description
scope github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct No description.
id *string No description.
props FunctionProps No description.
enableResourcePropertyConstraint *bool No description.

scopeRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct

idRequired

  • Type: *string

propsRequired


enableResourcePropertyConstraintOptional

  • Type: *bool

Methods

Name Description
ToString Returns a string representation of this construct.
Synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
AddCondition No description.
AddCount No description.
AddDependency No description.
AddResourceDesc No description.
ApplyRemovalPolicy No description.
GetAtt No description.
SetMetadata No description.
CodeFromAsset Loads the fcFunction code from a local disk path.
CodeFromBucket Function handler code as an OSS object.
CodeFromInline Inline code for FC fcFunction handler.

ToString

func ToString() *string

Returns a string representation of this construct.

Synthesize

func Synthesize(session ISynthesisSession)

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.

sessionRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ISynthesisSession

The synthesis session.


AddCondition

func AddCondition(condition RosCondition)

conditionRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosCondition

AddCount

func AddCount(count interface{})

countRequired

  • Type: interface{}

AddDependency

func AddDependency(resource Resource)

resourceRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Resource

AddResourceDesc

func AddResourceDesc(desc *string)

descRequired

  • Type: *string

ApplyRemovalPolicy

func ApplyRemovalPolicy(policy RemovalPolicy)

policyRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RemovalPolicy

GetAtt

func GetAtt(name *string) IResolvable

nameRequired

  • Type: *string

SetMetadata

func SetMetadata(key *string, value interface{})

keyRequired

  • Type: *string

valueRequired

  • Type: interface{}

CodeFromAsset

func CodeFromAsset(path *string)

Loads the fcFunction code from a local disk path.

pathRequired

  • Type: *string

Either a directory with the Lambda code bundle or a .zip file.


CodeFromBucket

func CodeFromBucket(bucket Bucket, key *string)

Function handler code as an OSS object.

bucketRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkoss.Bucket

The OSS bucket.


keyRequired

  • Type: *string

The object key.


CodeFromInline

func CodeFromInline(code *string)

Inline code for FC fcFunction handler.

codeRequired

  • Type: *string

The actual handler code (limited to 4KiB).


Static Functions

Name Description
IsConstruct Return whether the given object is a Construct.

IsConstruct

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkfc"
alicloudroscdkfc.Function_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct.

xRequired

  • Type: interface{}

Properties

Name Type Description
Node github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode The construct tree node associated with this construct.
Ref *string No description.
Stack github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack The stack in which this resource is defined.
Resource github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource No description.
AttrArn github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute ARN: The ARN for ALIYUN::ROS::CustomResource.
AttrFunctionId github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute FunctionId: The function ID.
AttrFunctionName github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute FunctionName: The function name.
AttrServiceId github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute ServiceId: The service ID.
AttrServiceName github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute ServiceName: The service name.

NodeRequired

func Node() ConstructNode
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode

The construct tree node associated with this construct.


RefRequired

func Ref() *string
  • Type: *string

StackRequired

func Stack() Stack
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack

The stack in which this resource is defined.


ResourceOptional

func Resource() RosResource
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource

AttrArnRequired

func AttrArn() IResolvable
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable

Attribute ARN: The ARN for ALIYUN::ROS::CustomResource.


AttrFunctionIdRequired

func AttrFunctionId() IResolvable
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable

Attribute FunctionId: The function ID.


AttrFunctionNameRequired

func AttrFunctionName() IResolvable
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable

Attribute FunctionName: The function name.


AttrServiceIdRequired

func AttrServiceId() IResolvable
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable

Attribute ServiceId: The service ID.


AttrServiceNameRequired

func AttrServiceName() IResolvable
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable

Attribute ServiceName: The service name.