Interface IAwsCustomResourceProps
Properties for AwsCustomResource.
Namespace: Amazon.CDK.CustomResources
Assembly: Amazon.CDK.AWS.CustomResources.dll
Syntax (csharp)
public interface IAwsCustomResourceProps
Syntax (vb)
Public Interface IAwsCustomResourceProps
Remarks
Note that at least onCreate, onUpdate or onDelete must be specified.
Synopsis
Properties
FunctionName | A name for the Lambda function implementing this custom resource. |
InstallLatestAwsSdk | Whether to install the latest AWS SDK v2. Allows to use the latest API calls documented at https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html. |
LogRetention | The number of days log events of the Lambda function implementing this custom resource are kept in CloudWatch Logs. |
OnCreate | The AWS SDK call to make when the resource is created. |
OnDelete | The AWS SDK call to make when the resource is deleted. |
OnUpdate | The AWS SDK call to make when the resource is updated. |
Policy | The policy that will be added to the execution role of the Lambda function implementing this custom resource provider. |
ResourceType | Cloudformation Resource type. |
Role | The execution role for the Lambda function implementing this custom resource provider. |
Timeout | The timeout for the Lambda function implementing this custom resource. |
Properties
FunctionName
A name for the Lambda function implementing this custom resource.
virtual string FunctionName { get; }
Property Value
System.String
Remarks
Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
InstallLatestAwsSdk
Whether to install the latest AWS SDK v2. Allows to use the latest API calls documented at https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html.
virtual Nullable<bool> InstallLatestAwsSdk { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
The installation takes around 60 seconds.
Default: true
LogRetention
The number of days log events of the Lambda function implementing this custom resource are kept in CloudWatch Logs.
virtual Nullable<RetentionDays> LogRetention { get; }
Property Value
System.Nullable<RetentionDays>
Remarks
Default: logs.RetentionDays.INFINITE
OnCreate
The AWS SDK call to make when the resource is created.
virtual IAwsSdkCall OnCreate { get; }
Property Value
Remarks
Default: - the call when the resource is updated
OnDelete
The AWS SDK call to make when the resource is deleted.
virtual IAwsSdkCall OnDelete { get; }
Property Value
Remarks
Default: - no call
OnUpdate
The AWS SDK call to make when the resource is updated.
virtual IAwsSdkCall OnUpdate { get; }
Property Value
Remarks
Default: - no call
Policy
The policy that will be added to the execution role of the Lambda function implementing this custom resource provider.
AwsCustomResourcePolicy Policy { get; }
Property Value
Remarks
The custom resource also implements iam.IGrantable
, making it possible
to use the grantXxx()
methods.
As this custom resource uses a singleton Lambda function, it's important to note the that function's role will eventually accumulate the permissions/grants from all resources.
See: Policy.fromSdkCalls
ResourceType
Cloudformation Resource type.
virtual string ResourceType { get; }
Property Value
System.String
Remarks
Default: - Custom::AWS
Role
The execution role for the Lambda function implementing this custom resource provider.
virtual IRole Role { get; }
Property Value
Remarks
This role will apply to all AwsCustomResource
instances in the stack. The role must be assumable by the
lambda.amazonaws.com
service principal.
Default: - a new role is created
Timeout
The timeout for the Lambda function implementing this custom resource.
virtual Duration Timeout { get; }
Property Value
Remarks
Default: Duration.minutes(2)