Class CfnFunctionDefinition
A CloudFormation AWS::Greengrass::FunctionDefinition
.
Inherited Members
Namespace: Amazon.CDK.AWS.Greengrass
Assembly: Amazon.CDK.AWS.Greengrass.dll
Syntax (csharp)
public class CfnFunctionDefinition : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnFunctionDefinition
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::Greengrass::FunctionDefinition
resource represents a function definition for AWS IoT Greengrass . Function definitions are used to organize your function definition versions.
Function definitions can reference multiple function definition versions. All function definition versions must be associated with a function definition. Each function definition version can contain one or more functions.
When you create a function definition, you can optionally include an initial function definition version. To associate a function definition version later, create an AWS::Greengrass::FunctionDefinitionVersion
resource and specify the ID of this function definition.
After you create the function definition version that contains the functions you want to deploy, you must add it to your group version. For more information, see AWS::Greengrass::Group
.
CloudformationResource: AWS::Greengrass::FunctionDefinition
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Greengrass;
var tags;
var variables;
var cfnFunctionDefinition = new CfnFunctionDefinition(this, "MyCfnFunctionDefinition", new CfnFunctionDefinitionProps {
Name = "name",
// the properties below are optional
InitialVersion = new FunctionDefinitionVersionProperty {
Functions = new [] { new FunctionProperty {
FunctionArn = "functionArn",
FunctionConfiguration = new FunctionConfigurationProperty {
EncodingType = "encodingType",
Environment = new EnvironmentProperty {
AccessSysfs = false,
Execution = new ExecutionProperty {
IsolationMode = "isolationMode",
RunAs = new RunAsProperty {
Gid = 123,
Uid = 123
}
},
ResourceAccessPolicies = new [] { new ResourceAccessPolicyProperty {
ResourceId = "resourceId",
// the properties below are optional
Permission = "permission"
} },
Variables = variables
},
ExecArgs = "execArgs",
Executable = "executable",
MemorySize = 123,
Pinned = false,
Timeout = 123
},
Id = "id"
} },
// the properties below are optional
DefaultConfig = new DefaultConfigProperty {
Execution = new ExecutionProperty {
IsolationMode = "isolationMode",
RunAs = new RunAsProperty {
Gid = 123,
Uid = 123
}
}
}
},
Tags = tags
});
Synopsis
Constructors
CfnFunctionDefinition(Construct, String, ICfnFunctionDefinitionProps) | Create a new |
CfnFunctionDefinition(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnFunctionDefinition(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the |
AttrId | The ID of the |
AttrLatestVersionArn | The ARN of the last |
AttrName | The name of the |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
InitialVersion | The function definition version to include when the function definition is created. |
Name | The name of the function definition. |
Tags | Application-specific metadata to attach to the function definition. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnFunctionDefinition(Construct, String, ICfnFunctionDefinitionProps)
Create a new AWS::Greengrass::FunctionDefinition
.
public CfnFunctionDefinition(Construct scope, string id, ICfnFunctionDefinitionProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnFunctionDefinitionProps
- resource properties.
CfnFunctionDefinition(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnFunctionDefinition(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnFunctionDefinition(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnFunctionDefinition(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the FunctionDefinition
, such as arn:aws:greengrass:us-east-1: :/greengrass/definition/functions/1234a5b6-78cd-901e-2fgh-3i45j6k178l9
.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrId
The ID of the FunctionDefinition
, such as 1234a5b6-78cd-901e-2fgh-3i45j6k178l9
.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrLatestVersionArn
The ARN of the last FunctionDefinitionVersion
that was added to the FunctionDefinition
, such as arn:aws:greengrass:us-east-1: :/greengrass/definition/functions/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2
.
public virtual string AttrLatestVersionArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LatestVersionArn
AttrName
The name of the FunctionDefinition
, such as MyFunctionDefinition
.
public virtual string AttrName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Name
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
InitialVersion
The function definition version to include when the function definition is created.
public virtual object InitialVersion { get; set; }
Property Value
System.Object
Remarks
A function definition version contains a list of function
property types.
To associate a function definition version after the function definition is created, create an AWS::Greengrass::FunctionDefinitionVersion
resource and specify the ID of this function definition.
Name
The name of the function definition.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
Tags
Application-specific metadata to attach to the function definition.
public virtual TagManager Tags { get; }
Property Value
Remarks
You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tagging Your AWS IoT Greengrass Resources in the Developer Guide .
This Json
property type is processed as a map of key-value pairs. It uses the following format, which is different from most Tags
implementations in AWS CloudFormation templates.
"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
}
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>