class CustomResourceProviderBase
Language | Type name |
---|---|
.NET | Amazon.CDK.CustomResourceProviderBase |
Go | github.com/aws/aws-cdk-go/awscdk/v2#CustomResourceProviderBase |
Java | software.amazon.awscdk.CustomResourceProviderBase |
Python | aws_cdk.CustomResourceProviderBase |
TypeScript (source) | aws-cdk-lib » CustomResourceProviderBase |
Implements
IConstruct
, IDependable
Extends
Construct
Implemented by
Custom
Base class for creating a custom resource provider.
Initializer (protected)
super(scope: Construct, id: string, props: CustomResourceProviderBaseProps)
Parameters
- scope
Construct
- id
string
- props
Custom
Resource Provider Base Props
Properties
Name | Type | Description |
---|---|---|
code | string | The hash of the lambda code backing this provider. |
node | Node | The tree node. |
role | string | The ARN of the provider's AWS Lambda function role. |
service | string | The ARN of the provider's AWS Lambda function which should be used as the serviceToken when defining a custom resource. |
codeHash
Type:
string
The hash of the lambda code backing this provider.
Can be used to trigger updates on code changes, even when the properties of a custom resource remain unchanged.
node
Type:
Node
The tree node.
roleArn
Type:
string
The ARN of the provider's AWS Lambda function role.
serviceToken
Type:
string
The ARN of the provider's AWS Lambda function which should be used as the serviceToken
when defining a custom resource.
Methods
Name | Description |
---|---|
add | Add an IAM policy statement to the inline policy of the provider's lambda function's role. |
to | Returns a string representation of this construct. |
addToRolePolicy(statement)
public addToRolePolicy(statement: any): void
Parameters
- statement
any
Add an IAM policy statement to the inline policy of the provider's lambda function's role.
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.
Example
declare const myProvider: CustomResourceProvider;
myProvider.addToRolePolicy({
Effect: 'Allow',
Action: 's3:GetObject',
Resource: '*',
});
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.