Function
- Implements: IFunction
This class encapsulates and extends the ROS resource type ALIYUN::FC::Function.
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
- Type: FunctionProps
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. |
FetchCondition | No description. |
FetchDependency | No description. |
FetchResourceDesc | 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.
- Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ISynthesisSession
The synthesis session.
AddCondition
func AddCondition(condition RosCondition)
- Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosCondition
AddCount
func AddCount(count interface{})
- Type: interface{}
AddDependency
func AddDependency(resource Resource)
- Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Resource
AddResourceDesc
func AddResourceDesc(desc *string)
- Type: *string
ApplyRemovalPolicy
func ApplyRemovalPolicy(policy RemovalPolicy)
- Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RemovalPolicy
FetchCondition
func FetchCondition() RosCondition
FetchDependency
func FetchDependency() *[]*string
FetchResourceDesc
func FetchResourceDesc() *string
GetAtt
func GetAtt(name *string) IResolvable
- Type: *string
SetMetadata
func SetMetadata(key *string, value interface{})
- Type: *string
- Type: interface{}
CodeFromAsset
func CodeFromAsset(path *string)
Loads the fcFunction code from a local disk path.
- 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.
- Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkoss.Bucket
The OSS bucket.
- Type: *string
The object key.
CodeFromInline
func CodeFromInline(code *string)
Inline code for FC fcFunction handler.
- 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.
- Type: interface{}
Properties
| Name | Type | Description |
|---|---|---|
Node | github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode | The construct tree node associated with this construct. |
Env | github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResourceEnvironment | The environment this resource belongs to. |
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 | interface{} | Attribute ARN: The ARN for ALIYUN::ROS::CustomResource. |
AttrFunctionId | interface{} | Attribute FunctionId: The function ID. |
AttrFunctionName | interface{} | Attribute FunctionName: The function name. |
AttrServiceId | interface{} | Attribute ServiceId: The service ID. |
AttrServiceName | interface{} | Attribute ServiceName: The service name. |
Props | FunctionProps | No description. |
NodeRequired
func Node() ConstructNode
- Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode
The construct tree node associated with this construct.
EnvRequired
func Env() IResourceEnvironment
- Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
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() interface{}
- Type: interface{}
Attribute ARN: The ARN for ALIYUN::ROS::CustomResource.
AttrFunctionIdRequired
func AttrFunctionId() interface{}
- Type: interface{}
Attribute FunctionId: The function ID.
AttrFunctionNameRequired
func AttrFunctionName() interface{}
- Type: interface{}
Attribute FunctionName: The function name.
AttrServiceIdRequired
func AttrServiceId() interface{}
- Type: interface{}
Attribute ServiceId: The service ID.
AttrServiceNameRequired
func AttrServiceName() interface{}
- Type: interface{}
Attribute ServiceName: The service name.
PropsRequired
func Props() FunctionProps
- Type: FunctionProps