Class CustomResourceProviderBase
Base class for creating a custom resource provider.
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class CustomResourceProviderBase : Construct
Syntax (vb)
Public MustInherit Class CustomResourceProviderBase Inherits Construct
Synopsis
Constructors
| CustomResourceProviderBase(Construct, string, ICustomResourceProviderBaseProps) | Base class for creating a custom resource provider. |
Properties
| CodeHash | The hash of the lambda code backing this provider. |
| RoleArn | The ARN of the provider's AWS Lambda function role. |
| ServiceToken | The ARN of the provider's AWS Lambda function which should be used as the |
Methods
| AddToRolePolicy(object) | Add an IAM policy statement to the inline policy of the provider's lambda function's role. |
Constructors
CustomResourceProviderBase(Construct, string, ICustomResourceProviderBaseProps)
Base class for creating a custom resource provider.
protected CustomResourceProviderBase(Construct scope, string id, ICustomResourceProviderBaseProps props)
Parameters
- scope Construct
- id string
- props ICustomResourceProviderBaseProps
Properties
CodeHash
The hash of the lambda code backing this provider.
public virtual string CodeHash { get; }
Property Value
Remarks
Can be used to trigger updates on code changes, even when the properties of a custom resource remain unchanged.
RoleArn
The ARN of the provider's AWS Lambda function role.
public virtual string RoleArn { get; }
Property Value
ServiceToken
The ARN of the provider's AWS Lambda function which should be used as the serviceToken when defining a custom resource.
public virtual string ServiceToken { get; }
Property Value
Methods
AddToRolePolicy(object)
Add an IAM policy statement to the inline policy of the provider's lambda function's role.
public virtual void AddToRolePolicy(object statement)
Parameters
- statement object
Remarks
Please note: this is a direct IAM JSON policy blob, not a iam.PolicyStatement
object like you will see in the rest of the CDK.
Examples
CustomResourceProvider myProvider;
myProvider.AddToRolePolicy(new Dictionary<string, string> {
{ "Effect", "Allow" },
{ "Action", "s3:GetObject" },
{ "Resource", "*" }
});