Class ParamsAndSecretsLayerVersion
Parameters and Secrets Extension layer version.
Inheritance
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class ParamsAndSecretsLayerVersion : DeputyBase
Syntax (vb)
Public MustInherit Class ParamsAndSecretsLayerVersion
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.SecretsManager;
using Amazon.CDK.AWS.SSM;
var secret = new Secret(this, "Secret");
var parameter = new StringParameter(this, "Parameter", new StringParameterProps {
ParameterName = "mySsmParameterName",
StringValue = "mySsmParameterValue"
});
var paramsAndSecrets = ParamsAndSecretsLayerVersion.FromVersion(ParamsAndSecretsVersions.V1_0_103, new ParamsAndSecretsOptions {
CacheSize = 500,
LogLevel = ParamsAndSecretsLogLevel.DEBUG
});
var lambdaFunction = new Function(this, "MyFunction", new FunctionProps {
Runtime = Runtime.NODEJS_18_X,
Handler = "index.handler",
Architecture = Architecture.ARM_64,
Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
ParamsAndSecrets = paramsAndSecrets
});
secret.GrantRead(lambdaFunction);
parameter.GrantRead(lambdaFunction);
Synopsis
Constructors
ParamsAndSecretsLayerVersion(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ParamsAndSecretsLayerVersion(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
FromVersion(ParamsAndSecretsVersions, IParamsAndSecretsOptions) | Use a specific version of the Parameters and Secrets Extension to generate a layer version. |
FromVersionArn(String, IParamsAndSecretsOptions) | Use the Parameters and Secrets Extension associated with the provided ARN. |
Constructors
ParamsAndSecretsLayerVersion(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ParamsAndSecretsLayerVersion(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ParamsAndSecretsLayerVersion(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ParamsAndSecretsLayerVersion(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
FromVersion(ParamsAndSecretsVersions, IParamsAndSecretsOptions)
Use a specific version of the Parameters and Secrets Extension to generate a layer version.
public static ParamsAndSecretsLayerVersion FromVersion(ParamsAndSecretsVersions version, IParamsAndSecretsOptions options = null)
Parameters
- version ParamsAndSecretsVersions
- options IParamsAndSecretsOptions
Returns
FromVersionArn(String, IParamsAndSecretsOptions)
Use the Parameters and Secrets Extension associated with the provided ARN.
public static ParamsAndSecretsLayerVersion FromVersionArn(string arn, IParamsAndSecretsOptions options = null)
Parameters
- arn System.String
- options IParamsAndSecretsOptions
Returns
Remarks
Make sure the ARN is associated with the same region and architecture as your function.