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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CustomResourceProviderBase(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CustomResourceProviderBase(Construct, String, ICustomResourceProviderBaseProps) |
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(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CustomResourceProviderBase(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CustomResourceProviderBase(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CustomResourceProviderBase(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CustomResourceProviderBase(Construct, String, ICustomResourceProviderBaseProps)
protected CustomResourceProviderBase(Construct scope, string id, ICustomResourceProviderBaseProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ICustomResourceProviderBaseProps
Properties
CodeHash
The hash of the lambda code backing this provider.
public virtual string CodeHash { get; }
Property Value
System.String
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
System.String
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
System.String
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 System.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", "*" }
});