UNPKG

cdk-sops-secrets

Version:

CDK Constructs that syncs your sops secrets into AWS SecretsManager secrets.

1,412 lines (849 loc) • 119 kB
# API Reference <a name="API Reference" id="api-reference"></a> ## Constructs <a name="Constructs" id="Constructs"></a> ### MultiStringParameter <a name="MultiStringParameter" id="cdk-sops-secrets.MultiStringParameter"></a> #### Initializers <a name="Initializers" id="cdk-sops-secrets.MultiStringParameter.Initializer"></a> ```typescript import { MultiStringParameter } from 'cdk-sops-secrets' new MultiStringParameter(scope: Construct, id: string, props: MultiStringParameterProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.MultiStringParameter.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* | | <code><a href="#cdk-sops-secrets.MultiStringParameter.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* | | <code><a href="#cdk-sops-secrets.MultiStringParameter.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-sops-secrets.MultiStringParameterProps">MultiStringParameterProps</a></code> | *No description.* | --- ##### `scope`<sup>Required</sup> <a name="scope" id="cdk-sops-secrets.MultiStringParameter.Initializer.parameter.scope"></a> - *Type:* constructs.Construct --- ##### `id`<sup>Required</sup> <a name="id" id="cdk-sops-secrets.MultiStringParameter.Initializer.parameter.id"></a> - *Type:* string --- ##### `props`<sup>Required</sup> <a name="props" id="cdk-sops-secrets.MultiStringParameter.Initializer.parameter.props"></a> - *Type:* <a href="#cdk-sops-secrets.MultiStringParameterProps">MultiStringParameterProps</a> --- #### Methods <a name="Methods" id="Methods"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.MultiStringParameter.toString">toString</a></code> | Returns a string representation of this construct. | --- ##### `toString` <a name="toString" id="cdk-sops-secrets.MultiStringParameter.toString"></a> ```typescript public toString(): string ``` Returns a string representation of this construct. #### Static Functions <a name="Static Functions" id="Static Functions"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.MultiStringParameter.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. | --- ##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-sops-secrets.MultiStringParameter.isConstruct"></a> ```typescript import { MultiStringParameter } from 'cdk-sops-secrets' MultiStringParameter.isConstruct(x: any) ``` Checks if `x` is a construct. ###### `x`<sup>Required</sup> <a name="x" id="cdk-sops-secrets.MultiStringParameter.isConstruct.parameter.x"></a> - *Type:* any Any object. --- #### Properties <a name="Properties" id="Properties"></a> | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.MultiStringParameter.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. | | <code><a href="#cdk-sops-secrets.MultiStringParameter.property.encryptionKey">encryptionKey</a></code> | <code>aws-cdk-lib.aws_kms.IKey</code> | *No description.* | | <code><a href="#cdk-sops-secrets.MultiStringParameter.property.env">env</a></code> | <code>aws-cdk-lib.ResourceEnvironment</code> | *No description.* | | <code><a href="#cdk-sops-secrets.MultiStringParameter.property.keyPrefix">keyPrefix</a></code> | <code>string</code> | *No description.* | | <code><a href="#cdk-sops-secrets.MultiStringParameter.property.keySeparator">keySeparator</a></code> | <code>string</code> | *No description.* | | <code><a href="#cdk-sops-secrets.MultiStringParameter.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | *No description.* | | <code><a href="#cdk-sops-secrets.MultiStringParameter.property.sync">sync</a></code> | <code><a href="#cdk-sops-secrets.SopsSync">SopsSync</a></code> | *No description.* | --- ##### `node`<sup>Required</sup> <a name="node" id="cdk-sops-secrets.MultiStringParameter.property.node"></a> ```typescript public readonly node: Node; ``` - *Type:* constructs.Node The tree node. --- ##### `encryptionKey`<sup>Required</sup> <a name="encryptionKey" id="cdk-sops-secrets.MultiStringParameter.property.encryptionKey"></a> ```typescript public readonly encryptionKey: IKey; ``` - *Type:* aws-cdk-lib.aws_kms.IKey --- ##### `env`<sup>Required</sup> <a name="env" id="cdk-sops-secrets.MultiStringParameter.property.env"></a> ```typescript public readonly env: ResourceEnvironment; ``` - *Type:* aws-cdk-lib.ResourceEnvironment --- ##### `keyPrefix`<sup>Required</sup> <a name="keyPrefix" id="cdk-sops-secrets.MultiStringParameter.property.keyPrefix"></a> ```typescript public readonly keyPrefix: string; ``` - *Type:* string --- ##### `keySeparator`<sup>Required</sup> <a name="keySeparator" id="cdk-sops-secrets.MultiStringParameter.property.keySeparator"></a> ```typescript public readonly keySeparator: string; ``` - *Type:* string --- ##### `stack`<sup>Required</sup> <a name="stack" id="cdk-sops-secrets.MultiStringParameter.property.stack"></a> ```typescript public readonly stack: Stack; ``` - *Type:* aws-cdk-lib.Stack --- ##### `sync`<sup>Required</sup> <a name="sync" id="cdk-sops-secrets.MultiStringParameter.property.sync"></a> ```typescript public readonly sync: SopsSync; ``` - *Type:* <a href="#cdk-sops-secrets.SopsSync">SopsSync</a> --- ### SopsSecret <a name="SopsSecret" id="cdk-sops-secrets.SopsSecret"></a> - *Implements:* aws-cdk-lib.aws_secretsmanager.ISecret A drop in replacement for the normal Secret, that is populated with the encrypted content of the given sops file. #### Initializers <a name="Initializers" id="cdk-sops-secrets.SopsSecret.Initializer"></a> ```typescript import { SopsSecret } from 'cdk-sops-secrets' new SopsSecret(scope: Construct, id: string, props: SopsSecretProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSecret.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSecret.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSecret.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-sops-secrets.SopsSecretProps">SopsSecretProps</a></code> | *No description.* | --- ##### `scope`<sup>Required</sup> <a name="scope" id="cdk-sops-secrets.SopsSecret.Initializer.parameter.scope"></a> - *Type:* constructs.Construct --- ##### `id`<sup>Required</sup> <a name="id" id="cdk-sops-secrets.SopsSecret.Initializer.parameter.id"></a> - *Type:* string --- ##### `props`<sup>Required</sup> <a name="props" id="cdk-sops-secrets.SopsSecret.Initializer.parameter.props"></a> - *Type:* <a href="#cdk-sops-secrets.SopsSecretProps">SopsSecretProps</a> --- #### Methods <a name="Methods" id="Methods"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSecret.toString">toString</a></code> | Returns a string representation of this construct. | | <code><a href="#cdk-sops-secrets.SopsSecret.addRotationSchedule">addRotationSchedule</a></code> | Adds a rotation schedule to the secret. | | <code><a href="#cdk-sops-secrets.SopsSecret.addToResourcePolicy">addToResourcePolicy</a></code> | Adds a statement to the IAM resource policy associated with this secret. | | <code><a href="#cdk-sops-secrets.SopsSecret.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. | | <code><a href="#cdk-sops-secrets.SopsSecret.attach">attach</a></code> | Attach a target to this secret. | | <code><a href="#cdk-sops-secrets.SopsSecret.currentVersionId">currentVersionId</a></code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSecret.denyAccountRootDelete">denyAccountRootDelete</a></code> | Denies the `DeleteSecret` action to all principals within the current account. | | <code><a href="#cdk-sops-secrets.SopsSecret.grantRead">grantRead</a></code> | Grants reading the secret value to some role. | | <code><a href="#cdk-sops-secrets.SopsSecret.grantWrite">grantWrite</a></code> | Grants writing and updating the secret value to some role. | | <code><a href="#cdk-sops-secrets.SopsSecret.secretValueFromJson">secretValueFromJson</a></code> | Interpret the secret as a JSON object and return a field's value from it as a `SecretValue`. | --- ##### `toString` <a name="toString" id="cdk-sops-secrets.SopsSecret.toString"></a> ```typescript public toString(): string ``` Returns a string representation of this construct. ##### `addRotationSchedule` <a name="addRotationSchedule" id="cdk-sops-secrets.SopsSecret.addRotationSchedule"></a> ```typescript public addRotationSchedule(id: string, options: RotationScheduleOptions): RotationSchedule ``` Adds a rotation schedule to the secret. ###### `id`<sup>Required</sup> <a name="id" id="cdk-sops-secrets.SopsSecret.addRotationSchedule.parameter.id"></a> - *Type:* string --- ###### `options`<sup>Required</sup> <a name="options" id="cdk-sops-secrets.SopsSecret.addRotationSchedule.parameter.options"></a> - *Type:* aws-cdk-lib.aws_secretsmanager.RotationScheduleOptions --- ##### `addToResourcePolicy` <a name="addToResourcePolicy" id="cdk-sops-secrets.SopsSecret.addToResourcePolicy"></a> ```typescript public addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult ``` Adds a statement to the IAM resource policy associated with this secret. If this secret was created in this stack, a resource policy will be automatically created upon the first call to `addToResourcePolicy`. If the secret is imported, then this is a no-op. ###### `statement`<sup>Required</sup> <a name="statement" id="cdk-sops-secrets.SopsSecret.addToResourcePolicy.parameter.statement"></a> - *Type:* aws-cdk-lib.aws_iam.PolicyStatement --- ##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="cdk-sops-secrets.SopsSecret.applyRemovalPolicy"></a> ```typescript public applyRemovalPolicy(policy: RemovalPolicy): void ``` Apply the given removal policy to this resource. The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ###### `policy`<sup>Required</sup> <a name="policy" id="cdk-sops-secrets.SopsSecret.applyRemovalPolicy.parameter.policy"></a> - *Type:* aws-cdk-lib.RemovalPolicy --- ##### `attach` <a name="attach" id="cdk-sops-secrets.SopsSecret.attach"></a> ```typescript public attach(target: ISecretAttachmentTarget): ISecret ``` Attach a target to this secret. ###### `target`<sup>Required</sup> <a name="target" id="cdk-sops-secrets.SopsSecret.attach.parameter.target"></a> - *Type:* aws-cdk-lib.aws_secretsmanager.ISecretAttachmentTarget --- ##### `currentVersionId` <a name="currentVersionId" id="cdk-sops-secrets.SopsSecret.currentVersionId"></a> ```typescript public currentVersionId(): string ``` ##### `denyAccountRootDelete` <a name="denyAccountRootDelete" id="cdk-sops-secrets.SopsSecret.denyAccountRootDelete"></a> ```typescript public denyAccountRootDelete(): void ``` Denies the `DeleteSecret` action to all principals within the current account. ##### `grantRead` <a name="grantRead" id="cdk-sops-secrets.SopsSecret.grantRead"></a> ```typescript public grantRead(grantee: IGrantable, versionStages?: string[]): Grant ``` Grants reading the secret value to some role. ###### `grantee`<sup>Required</sup> <a name="grantee" id="cdk-sops-secrets.SopsSecret.grantRead.parameter.grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- ###### `versionStages`<sup>Optional</sup> <a name="versionStages" id="cdk-sops-secrets.SopsSecret.grantRead.parameter.versionStages"></a> - *Type:* string[] --- ##### `grantWrite` <a name="grantWrite" id="cdk-sops-secrets.SopsSecret.grantWrite"></a> ```typescript public grantWrite(_grantee: IGrantable): Grant ``` Grants writing and updating the secret value to some role. ###### `_grantee`<sup>Required</sup> <a name="_grantee" id="cdk-sops-secrets.SopsSecret.grantWrite.parameter._grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- ##### `secretValueFromJson` <a name="secretValueFromJson" id="cdk-sops-secrets.SopsSecret.secretValueFromJson"></a> ```typescript public secretValueFromJson(jsonField: string): SecretValue ``` Interpret the secret as a JSON object and return a field's value from it as a `SecretValue`. ###### `jsonField`<sup>Required</sup> <a name="jsonField" id="cdk-sops-secrets.SopsSecret.secretValueFromJson.parameter.jsonField"></a> - *Type:* string --- #### Static Functions <a name="Static Functions" id="Static Functions"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSecret.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. | --- ##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-sops-secrets.SopsSecret.isConstruct"></a> ```typescript import { SopsSecret } from 'cdk-sops-secrets' SopsSecret.isConstruct(x: any) ``` Checks if `x` is a construct. ###### `x`<sup>Required</sup> <a name="x" id="cdk-sops-secrets.SopsSecret.isConstruct.parameter.x"></a> - *Type:* any Any object. --- #### Properties <a name="Properties" id="Properties"></a> | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSecret.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. | | <code><a href="#cdk-sops-secrets.SopsSecret.property.env">env</a></code> | <code>aws-cdk-lib.ResourceEnvironment</code> | The environment this resource belongs to. | | <code><a href="#cdk-sops-secrets.SopsSecret.property.secretArn">secretArn</a></code> | <code>string</code> | The ARN of the secret in AWS Secrets Manager. | | <code><a href="#cdk-sops-secrets.SopsSecret.property.secretName">secretName</a></code> | <code>string</code> | The name of the secret. | | <code><a href="#cdk-sops-secrets.SopsSecret.property.secretValue">secretValue</a></code> | <code>aws-cdk-lib.SecretValue</code> | Retrieve the value of the stored secret as a `SecretValue`. | | <code><a href="#cdk-sops-secrets.SopsSecret.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. | | <code><a href="#cdk-sops-secrets.SopsSecret.property.sync">sync</a></code> | <code><a href="#cdk-sops-secrets.SopsSync">SopsSync</a></code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSecret.property.encryptionKey">encryptionKey</a></code> | <code>aws-cdk-lib.aws_kms.IKey</code> | The customer-managed encryption key that is used to encrypt this secret, if any. | | <code><a href="#cdk-sops-secrets.SopsSecret.property.secretFullArn">secretFullArn</a></code> | <code>string</code> | The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix. | --- ##### `node`<sup>Required</sup> <a name="node" id="cdk-sops-secrets.SopsSecret.property.node"></a> ```typescript public readonly node: Node; ``` - *Type:* constructs.Node The tree node. --- ##### `env`<sup>Required</sup> <a name="env" id="cdk-sops-secrets.SopsSecret.property.env"></a> ```typescript public readonly env: ResourceEnvironment; ``` - *Type:* aws-cdk-lib.ResourceEnvironment The environment this resource belongs to. For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into. --- ##### `secretArn`<sup>Required</sup> <a name="secretArn" id="cdk-sops-secrets.SopsSecret.property.secretArn"></a> ```typescript public readonly secretArn: string; ``` - *Type:* string The ARN of the secret in AWS Secrets Manager. Will return the full ARN if available, otherwise a partial arn. For secrets imported by the deprecated `fromSecretName`, it will return the `secretName`. --- ##### `secretName`<sup>Required</sup> <a name="secretName" id="cdk-sops-secrets.SopsSecret.property.secretName"></a> ```typescript public readonly secretName: string; ``` - *Type:* string The name of the secret. For "owned" secrets, this will be the full resource name (secret name + suffix), unless the '@aws-cdk/aws-secretsmanager:parseOwnedSecretName' feature flag is set. --- ##### `secretValue`<sup>Required</sup> <a name="secretValue" id="cdk-sops-secrets.SopsSecret.property.secretValue"></a> ```typescript public readonly secretValue: SecretValue; ``` - *Type:* aws-cdk-lib.SecretValue Retrieve the value of the stored secret as a `SecretValue`. --- ##### `stack`<sup>Required</sup> <a name="stack" id="cdk-sops-secrets.SopsSecret.property.stack"></a> ```typescript public readonly stack: Stack; ``` - *Type:* aws-cdk-lib.Stack The stack in which this resource is defined. --- ##### `sync`<sup>Required</sup> <a name="sync" id="cdk-sops-secrets.SopsSecret.property.sync"></a> ```typescript public readonly sync: SopsSync; ``` - *Type:* <a href="#cdk-sops-secrets.SopsSync">SopsSync</a> --- ##### `encryptionKey`<sup>Optional</sup> <a name="encryptionKey" id="cdk-sops-secrets.SopsSecret.property.encryptionKey"></a> ```typescript public readonly encryptionKey: IKey; ``` - *Type:* aws-cdk-lib.aws_kms.IKey The customer-managed encryption key that is used to encrypt this secret, if any. When not specified, the default KMS key for the account and region is being used. --- ##### `secretFullArn`<sup>Optional</sup> <a name="secretFullArn" id="cdk-sops-secrets.SopsSecret.property.secretFullArn"></a> ```typescript public readonly secretFullArn: string; ``` - *Type:* string The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix. This is equal to `secretArn` in most cases, but is undefined when a full ARN is not available (e.g., secrets imported by name). --- ### SopsStringParameter <a name="SopsStringParameter" id="cdk-sops-secrets.SopsStringParameter"></a> - *Implements:* aws-cdk-lib.aws_ssm.IStringParameter A drop in replacement for the normal String Parameter, that is populated with the encrypted content of the given sops file. #### Initializers <a name="Initializers" id="cdk-sops-secrets.SopsStringParameter.Initializer"></a> ```typescript import { SopsStringParameter } from 'cdk-sops-secrets' new SopsStringParameter(scope: Construct, id: string, props: SopsStringParameterProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.SopsStringParameter.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsStringParameter.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsStringParameter.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-sops-secrets.SopsStringParameterProps">SopsStringParameterProps</a></code> | *No description.* | --- ##### `scope`<sup>Required</sup> <a name="scope" id="cdk-sops-secrets.SopsStringParameter.Initializer.parameter.scope"></a> - *Type:* constructs.Construct --- ##### `id`<sup>Required</sup> <a name="id" id="cdk-sops-secrets.SopsStringParameter.Initializer.parameter.id"></a> - *Type:* string --- ##### `props`<sup>Required</sup> <a name="props" id="cdk-sops-secrets.SopsStringParameter.Initializer.parameter.props"></a> - *Type:* <a href="#cdk-sops-secrets.SopsStringParameterProps">SopsStringParameterProps</a> --- #### Methods <a name="Methods" id="Methods"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.SopsStringParameter.toString">toString</a></code> | Returns a string representation of this construct. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.grantRead">grantRead</a></code> | Grants read (DescribeParameter, GetParameters, GetParameter, GetParameterHistory) permissions on the SSM Parameter. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.grantWrite">grantWrite</a></code> | Grants write (PutParameter) permissions on the SSM Parameter. | --- ##### `toString` <a name="toString" id="cdk-sops-secrets.SopsStringParameter.toString"></a> ```typescript public toString(): string ``` Returns a string representation of this construct. ##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="cdk-sops-secrets.SopsStringParameter.applyRemovalPolicy"></a> ```typescript public applyRemovalPolicy(policy: RemovalPolicy): void ``` Apply the given removal policy to this resource. The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ###### `policy`<sup>Required</sup> <a name="policy" id="cdk-sops-secrets.SopsStringParameter.applyRemovalPolicy.parameter.policy"></a> - *Type:* aws-cdk-lib.RemovalPolicy --- ##### `grantRead` <a name="grantRead" id="cdk-sops-secrets.SopsStringParameter.grantRead"></a> ```typescript public grantRead(grantee: IGrantable): Grant ``` Grants read (DescribeParameter, GetParameters, GetParameter, GetParameterHistory) permissions on the SSM Parameter. ###### `grantee`<sup>Required</sup> <a name="grantee" id="cdk-sops-secrets.SopsStringParameter.grantRead.parameter.grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- ##### `grantWrite` <a name="grantWrite" id="cdk-sops-secrets.SopsStringParameter.grantWrite"></a> ```typescript public grantWrite(grantee: IGrantable): Grant ``` Grants write (PutParameter) permissions on the SSM Parameter. ###### `grantee`<sup>Required</sup> <a name="grantee" id="cdk-sops-secrets.SopsStringParameter.grantWrite.parameter.grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- #### Static Functions <a name="Static Functions" id="Static Functions"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.SopsStringParameter.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. | --- ##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-sops-secrets.SopsStringParameter.isConstruct"></a> ```typescript import { SopsStringParameter } from 'cdk-sops-secrets' SopsStringParameter.isConstruct(x: any) ``` Checks if `x` is a construct. ###### `x`<sup>Required</sup> <a name="x" id="cdk-sops-secrets.SopsStringParameter.isConstruct.parameter.x"></a> - *Type:* any Any object. --- #### Properties <a name="Properties" id="Properties"></a> | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.encryptionKey">encryptionKey</a></code> | <code>aws-cdk-lib.aws_kms.IKey</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.env">env</a></code> | <code>aws-cdk-lib.ResourceEnvironment</code> | The environment this resource belongs to. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.parameterArn">parameterArn</a></code> | <code>string</code> | The ARN of the SSM Parameter resource. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.parameterName">parameterName</a></code> | <code>string</code> | The name of the SSM Parameter resource. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.parameterType">parameterType</a></code> | <code>string</code> | The type of the SSM Parameter resource. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.stringValue">stringValue</a></code> | <code>string</code> | The parameter value. | | <code><a href="#cdk-sops-secrets.SopsStringParameter.property.sync">sync</a></code> | <code><a href="#cdk-sops-secrets.SopsSync">SopsSync</a></code> | *No description.* | --- ##### `node`<sup>Required</sup> <a name="node" id="cdk-sops-secrets.SopsStringParameter.property.node"></a> ```typescript public readonly node: Node; ``` - *Type:* constructs.Node The tree node. --- ##### `encryptionKey`<sup>Required</sup> <a name="encryptionKey" id="cdk-sops-secrets.SopsStringParameter.property.encryptionKey"></a> ```typescript public readonly encryptionKey: IKey; ``` - *Type:* aws-cdk-lib.aws_kms.IKey --- ##### `env`<sup>Required</sup> <a name="env" id="cdk-sops-secrets.SopsStringParameter.property.env"></a> ```typescript public readonly env: ResourceEnvironment; ``` - *Type:* aws-cdk-lib.ResourceEnvironment The environment this resource belongs to. For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into. --- ##### `parameterArn`<sup>Required</sup> <a name="parameterArn" id="cdk-sops-secrets.SopsStringParameter.property.parameterArn"></a> ```typescript public readonly parameterArn: string; ``` - *Type:* string The ARN of the SSM Parameter resource. --- ##### `parameterName`<sup>Required</sup> <a name="parameterName" id="cdk-sops-secrets.SopsStringParameter.property.parameterName"></a> ```typescript public readonly parameterName: string; ``` - *Type:* string The name of the SSM Parameter resource. --- ##### `parameterType`<sup>Required</sup> <a name="parameterType" id="cdk-sops-secrets.SopsStringParameter.property.parameterType"></a> ```typescript public readonly parameterType: string; ``` - *Type:* string The type of the SSM Parameter resource. --- ##### `stack`<sup>Required</sup> <a name="stack" id="cdk-sops-secrets.SopsStringParameter.property.stack"></a> ```typescript public readonly stack: Stack; ``` - *Type:* aws-cdk-lib.Stack The stack in which this resource is defined. --- ##### `stringValue`<sup>Required</sup> <a name="stringValue" id="cdk-sops-secrets.SopsStringParameter.property.stringValue"></a> ```typescript public readonly stringValue: string; ``` - *Type:* string The parameter value. Value must not nest another parameter. Do not use {{}} in the value. --- ##### `sync`<sup>Required</sup> <a name="sync" id="cdk-sops-secrets.SopsStringParameter.property.sync"></a> ```typescript public readonly sync: SopsSync; ``` - *Type:* <a href="#cdk-sops-secrets.SopsSync">SopsSync</a> --- ### SopsSync <a name="SopsSync" id="cdk-sops-secrets.SopsSync"></a> The custom resource, that is syncing the content from a sops file to a secret. #### Initializers <a name="Initializers" id="cdk-sops-secrets.SopsSync.Initializer"></a> ```typescript import { SopsSync } from 'cdk-sops-secrets' new SopsSync(scope: Construct, id: string, props: SopsSyncProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSync.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSync.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSync.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-sops-secrets.SopsSyncProps">SopsSyncProps</a></code> | *No description.* | --- ##### `scope`<sup>Required</sup> <a name="scope" id="cdk-sops-secrets.SopsSync.Initializer.parameter.scope"></a> - *Type:* constructs.Construct --- ##### `id`<sup>Required</sup> <a name="id" id="cdk-sops-secrets.SopsSync.Initializer.parameter.id"></a> - *Type:* string --- ##### `props`<sup>Required</sup> <a name="props" id="cdk-sops-secrets.SopsSync.Initializer.parameter.props"></a> - *Type:* <a href="#cdk-sops-secrets.SopsSyncProps">SopsSyncProps</a> --- #### Methods <a name="Methods" id="Methods"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSync.toString">toString</a></code> | Returns a string representation of this construct. | --- ##### `toString` <a name="toString" id="cdk-sops-secrets.SopsSync.toString"></a> ```typescript public toString(): string ``` Returns a string representation of this construct. #### Static Functions <a name="Static Functions" id="Static Functions"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSync.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. | --- ##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-sops-secrets.SopsSync.isConstruct"></a> ```typescript import { SopsSync } from 'cdk-sops-secrets' SopsSync.isConstruct(x: any) ``` Checks if `x` is a construct. ###### `x`<sup>Required</sup> <a name="x" id="cdk-sops-secrets.SopsSync.isConstruct.parameter.x"></a> - *Type:* any Any object. --- #### Properties <a name="Properties" id="Properties"></a> | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSync.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. | | <code><a href="#cdk-sops-secrets.SopsSync.property.versionId">versionId</a></code> | <code>string</code> | The current versionId of the secret populated via this resource. | --- ##### `node`<sup>Required</sup> <a name="node" id="cdk-sops-secrets.SopsSync.property.node"></a> ```typescript public readonly node: Node; ``` - *Type:* constructs.Node The tree node. --- ##### `versionId`<sup>Required</sup> <a name="versionId" id="cdk-sops-secrets.SopsSync.property.versionId"></a> ```typescript public readonly versionId: string; ``` - *Type:* string The current versionId of the secret populated via this resource. --- ### SopsSyncProvider <a name="SopsSyncProvider" id="cdk-sops-secrets.SopsSyncProvider"></a> - *Implements:* aws-cdk-lib.aws_iam.IGrantable #### Initializers <a name="Initializers" id="cdk-sops-secrets.SopsSyncProvider.Initializer"></a> ```typescript import { SopsSyncProvider } from 'cdk-sops-secrets' new SopsSyncProvider(scope: Construct, id?: string, props?: SopsSyncProviderProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-sops-secrets.SopsSyncProviderProps">SopsSyncProviderProps</a></code> | *No description.* | --- ##### `scope`<sup>Required</sup> <a name="scope" id="cdk-sops-secrets.SopsSyncProvider.Initializer.parameter.scope"></a> - *Type:* constructs.Construct --- ##### `id`<sup>Optional</sup> <a name="id" id="cdk-sops-secrets.SopsSyncProvider.Initializer.parameter.id"></a> - *Type:* string --- ##### `props`<sup>Optional</sup> <a name="props" id="cdk-sops-secrets.SopsSyncProvider.Initializer.parameter.props"></a> - *Type:* <a href="#cdk-sops-secrets.SopsSyncProviderProps">SopsSyncProviderProps</a> --- #### Methods <a name="Methods" id="Methods"></a> | **Name** | **Description** | | --- | --- | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.toString">toString</a></code> | Returns a string representation of this construct. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addEventSource">addEventSource</a></code> | Adds an event source to this function. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addEventSourceMapping">addEventSourceMapping</a></code> | Adds an event source that maps to this AWS Lambda function. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addFunctionUrl">addFunctionUrl</a></code> | Adds a url to this lambda function. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addPermission">addPermission</a></code> | Adds a permission to the Lambda resource policy. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addToRolePolicy">addToRolePolicy</a></code> | Adds a statement to the IAM role assumed by the instance. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.configureAsyncInvoke">configureAsyncInvoke</a></code> | Configures options for asynchronous invocation. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.considerWarningOnInvokeFunctionPermissions">considerWarningOnInvokeFunctionPermissions</a></code> | A warning will be added to functions under the following conditions: - permissions that include `lambda:InvokeFunction` are added to the unqualified function. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.grantInvoke">grantInvoke</a></code> | Grant the given identity permissions to invoke this Lambda. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.grantInvokeCompositePrincipal">grantInvokeCompositePrincipal</a></code> | Grant multiple principals the ability to invoke this Lambda via CompositePrincipal. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.grantInvokeLatestVersion">grantInvokeLatestVersion</a></code> | Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.grantInvokeUrl">grantInvokeUrl</a></code> | Grant the given identity permissions to invoke this Lambda Function URL. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.grantInvokeVersion">grantInvokeVersion</a></code> | Grant the given identity permissions to invoke the given version of this Lambda. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.metric">metric</a></code> | Return the given named metric for this Function. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.metricDuration">metricDuration</a></code> | How long execution of this Lambda takes. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.metricErrors">metricErrors</a></code> | How many invocations of this Lambda fail. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.metricInvocations">metricInvocations</a></code> | How often this Lambda is invoked. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.metricThrottles">metricThrottles</a></code> | How often this Lambda is throttled. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addDependency">addDependency</a></code> | Using node.addDependency() does not work on this method as the underlying lambda function is modeled as a singleton across the stack. Use this method instead to declare dependencies. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addEnvironment">addEnvironment</a></code> | Adds an environment variable to this Lambda function. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addLayers">addLayers</a></code> | Adds one or more Lambda Layers to this Lambda function. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addMetadata">addMetadata</a></code> | Use this method to write to the construct tree. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.dependOn">dependOn</a></code> | The SingletonFunction construct cannot be added as a dependency of another construct using node.addDependency(). Use this method instead to declare this as a dependency of another construct. | | <code><a href="#cdk-sops-secrets.SopsSyncProvider.addAgeKey">addAgeKey</a></code> | *No description.* | --- ##### `toString` <a name="toString" id="cdk-sops-secrets.SopsSyncProvider.toString"></a> ```typescript public toString(): string ``` Returns a string representation of this construct. ##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="cdk-sops-secrets.SopsSyncProvider.applyRemovalPolicy"></a> ```typescript public applyRemovalPolicy(policy: RemovalPolicy): void ``` Apply the given removal policy to this resource. The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ###### `policy`<sup>Required</sup> <a name="policy" id="cdk-sops-secrets.SopsSyncProvider.applyRemovalPolicy.parameter.policy"></a> - *Type:* aws-cdk-lib.RemovalPolicy --- ##### `addEventSource` <a name="addEventSource" id="cdk-sops-secrets.SopsSyncProvider.addEventSource"></a> ```typescript public addEventSource(source: IEventSource): void ``` Adds an event source to this function. Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module. The following example adds an SQS Queue as an event source: ``` import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources'; myFunction.addEventSource(new SqsEventSource(myQueue)); ``` ###### `source`<sup>Required</sup> <a name="source" id="cdk-sops-secrets.SopsSyncProvider.addEventSource.parameter.source"></a> - *Type:* aws-cdk-lib.aws_lambda.IEventSource --- ##### `addEventSourceMapping` <a name="addEventSourceMapping" id="cdk-sops-secrets.SopsSyncProvider.addEventSourceMapping"></a> ```typescript public addEventSourceMapping(id: string, options: EventSourceMappingOptions): EventSourceMapping ``` Adds an event source that maps to this AWS Lambda function. ###### `id`<sup>Required</sup> <a name="id" id="cdk-sops-secrets.SopsSyncProvider.addEventSourceMapping.parameter.id"></a> - *Type:* string --- ###### `options`<sup>Required</sup> <a name="options" id="cdk-sops-secrets.SopsSyncProvider.addEventSourceMapping.parameter.options"></a> - *Type:* aws-cdk-lib.aws_lambda.EventSourceMappingOptions --- ##### `addFunctionUrl` <a name="addFunctionUrl" id="cdk-sops-secrets.SopsSyncProvider.addFunctionUrl"></a> ```typescript public addFunctionUrl(options?: FunctionUrlOptions): FunctionUrl ``` Adds a url to this lambda function. ###### `options`<sup>Optional</sup> <a name="options" id="cdk-sops-secrets.SopsSyncProvider.addFunctionUrl.parameter.options"></a> - *Type:* aws-cdk-lib.aws_lambda.FunctionUrlOptions --- ##### `addPermission` <a name="addPermission" id="cdk-sops-secrets.SopsSyncProvider.addPermission"></a> ```typescript public addPermission(name: string, permission: Permission): void ``` Adds a permission to the Lambda resource policy. ###### `name`<sup>Required</sup> <a name="name" id="cdk-sops-secrets.SopsSyncProvider.addPermission.parameter.name"></a> - *Type:* string --- ###### `permission`<sup>Required</sup> <a name="permission" id="cdk-sops-secrets.SopsSyncProvider.addPermission.parameter.permission"></a> - *Type:* aws-cdk-lib.aws_lambda.Permission --- ##### `addToRolePolicy` <a name="addToRolePolicy" id="cdk-sops-secrets.SopsSyncProvider.addToRolePolicy"></a> ```typescript public addToRolePolicy(statement: PolicyStatement): void ``` Adds a statement to the IAM role assumed by the instance. ###### `statement`<sup>Required</sup> <a name="statement" id="cdk-sops-secrets.SopsSyncProvider.addToRolePolicy.parameter.statement"></a> - *Type:* aws-cdk-lib.aws_iam.PolicyStatement --- ##### `configureAsyncInvoke` <a name="configureAsyncInvoke" id="cdk-sops-secrets.SopsSyncProvider.configureAsyncInvoke"></a> ```typescript public configureAsyncInvoke(options: EventInvokeConfigOptions): void ``` Configures options for asynchronous invocation. ###### `options`<sup>Required</sup> <a name="options" id="cdk-sops-secrets.SopsSyncProvider.configureAsyncInvoke.parameter.options"></a> - *Type:* aws-cdk-lib.aws_lambda.EventInvokeConfigOptions --- ##### `considerWarningOnInvokeFunctionPermissions` <a name="considerWarningOnInvokeFunctionPermissions" id="cdk-sops-secrets.SopsSyncProvider.considerWarningOnInvokeFunctionPermissions"></a> ```typescript public considerWarningOnInvokeFunctionPermissions(scope: Construct, action: string): void ``` A warning will be added to functions under the following conditions: - permissions that include `lambda:InvokeFunction` are added to the unqualified function. function.currentVersion is invoked before or after the permission is created. This applies only to permissions on Lambda functions, not versions or aliases. This function is overridden as a noOp for QualifiedFunctionBase. ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-sops-secrets.SopsSyncProvider.considerWarningOnInvokeFunctionPermissions.parameter.scope"></a> - *Type:* constructs.Construct --- ###### `action`<sup>Required</sup> <a name="action" id="cdk-sops-secrets.SopsSyncProvider.considerWarningOnInvokeFunctionPermissions.parameter.action"></a> - *Type:* string --- ##### `grantInvoke` <a name="grantInvoke" id="cdk-sops-secrets.SopsSyncProvider.grantInvoke"></a> ```typescript public grantInvoke(grantee: IGrantable): Grant ``` Grant the given identity permissions to invoke this Lambda. ###### `grantee`<sup>Required</sup> <a name="grantee" id="cdk-sops-secrets.SopsSyncProvider.grantInvoke.parameter.grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- ##### `grantInvokeCompositePrincipal` <a name="grantInvokeCompositePrincipal" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeCompositePrincipal"></a> ```typescript public grantInvokeCompositePrincipal(compositePrincipal: CompositePrincipal): Grant[] ``` Grant multiple principals the ability to invoke this Lambda via CompositePrincipal. ###### `compositePrincipal`<sup>Required</sup> <a name="compositePrincipal" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeCompositePrincipal.parameter.compositePrincipal"></a> - *Type:* aws-cdk-lib.aws_iam.CompositePrincipal --- ##### `grantInvokeLatestVersion` <a name="grantInvokeLatestVersion" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeLatestVersion"></a> ```typescript public grantInvokeLatestVersion(grantee: IGrantable): Grant ``` Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda. ###### `grantee`<sup>Required</sup> <a name="grantee" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeLatestVersion.parameter.grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- ##### `grantInvokeUrl` <a name="grantInvokeUrl" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeUrl"></a> ```typescript public grantInvokeUrl(grantee: IGrantable): Grant ``` Grant the given identity permissions to invoke this Lambda Function URL. ###### `grantee`<sup>Required</sup> <a name="grantee" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeUrl.parameter.grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- ##### `grantInvokeVersion` <a name="grantInvokeVersion" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeVersion"></a> ```typescript public grantInvokeVersion(grantee: IGrantable, version: IVersion): Grant ``` Grant the given identity permissions to invoke the given version of this Lambda. ###### `grantee`<sup>Required</sup> <a name="grantee" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeVersion.parameter.grantee"></a> - *Type:* aws-cdk-lib.aws_iam.IGrantable --- ###### `version`<sup>Required</sup> <a name="version" id="cdk-sops-secrets.SopsSyncProvider.grantInvokeVersion.parameter.version"></a> - *Type:* aws-cdk-lib.aws_lambda.IVersion --- ##### `metric` <a name="metric" id="cdk-sops-secrets.SopsSyncProvider.metric"></a> ```typescript public metric(metricName: string, props?: MetricOptions): Metric ``` Return the given named metric for this Function. ###### `metricName`<sup>Required</sup> <a name="metricName" id="cdk-sops-secrets.SopsSyncProvider.metric.parameter.metricName"></a> - *Type:* string --- ###### `props`<sup>Optional</sup> <a name="props" id="cdk-sops-secrets.SopsSyncProvider.metric.parameter.props"></a> - *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions --- ##### `metricDuration` <a name="metricDuration" id="cdk-sops-secrets.SopsSyncProvider.metricDuration"></a> ```typescript public metricDuration(props?: MetricOptions): Metric ``` How long execution of this Lambda takes. Average over 5 minutes ###### `props`<sup>Optional</sup> <a name="props" id="cdk-sops-secrets.SopsSyncProvider.metricDuration.parameter.props"></a> - *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions --- ##### `metricErrors` <a name="metricErrors" id="cdk-sops-secrets.SopsSyncProvider.metricErrors"></a> ```typescript public metricErrors(props?: MetricOptions): Metric ``` How many invocations of this Lambda fail. Sum over 5 minutes ###### `props`<sup>Optional</sup> <a name="props" id="cdk-sops-secrets.SopsSyncProvider.metricErrors.parameter.props"></a> - *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions --- ##### `metricInvocations` <a name="metricInvocations" id="cdk-sops-secrets.SopsSyncProvider.metricInvocations"></a> ```typescript public metricInvocations(props?: MetricOptions): Metric ``` How often this Lambda is invoked. Sum over 5 minutes ###### `props`<sup>Optional</sup> <a name="props" id="cdk-sops-secrets.SopsSyncProvider.metricInvocations.parameter.props"></a> - *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions --- ##### `metricThrottles` <a name="metricThrottles" id="cdk-sops-secrets.SopsSyncProvider.metricThrottles"></a> ```typescript public metricThrottles(props?: MetricOptions): Metric ``` How often this Lambda is throttled. Sum over 5 minutes ###### `props`<sup>Optional</sup> <a name="props" id="cdk-sops-secrets.SopsSyncProvider.metricThrottles.parameter.props"></a> - *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions --- ##### `addDependency` <a name="addDependency" id="cdk-sops-secrets.SopsSyncProvider.addDependency"></a> ```typescript public addDependency(up: ...IDependable[]): void ``` Using node.addDependency() does not work on this method as the underlying lambda function is modeled as a singleton across the stack. Use this method instead to declare dependencies. ###### `up`<sup>Required</sup> <a name="up" id="cdk-sops-secrets.SopsSyncProvider.addDependency.parameter.up"></a> - *Type:* ...constructs.IDependable[] --- ##### `addEnvironment` <a name="addEnvironment" id="cdk-sops-secrets.SopsSyncProvider.addEnvironment"></a> ```typescript public addEnvironment(key: string, value: string, options?: EnvironmentOptions): Function ``` Adds an environment variable to this Lambda function. If this is a ref to a Lambda function, this operation results in a no-op. ###### `key`<sup>Required</sup> <a name="key" id="cdk-sops-secrets.SopsSyncProvider.addEnvironment.parameter.key"></a> - *Type:* string The environment variable key. --- ###### `value`<sup>Required</sup> <a name="value" id="cdk-sops-secrets.SopsSyncProvider.addEnvironment.parameter.value"></a> - *Type:* string The environment variable's value. --- ###### `options`<sup>Optional</sup> <a name="options" id="cdk-sops-secrets.SopsSyncProvider.addEnvironment.parameter.options"></a> - *Type:* aws-cdk-lib.aws_lambda.EnvironmentOptions Environment variable options. --- ##### `addLayers` <a name="addLayers" id="cdk-sops-secrets.SopsSyncProvider.addLayers"></a> ```typescript public addLayers(layers: ...ILayerVersion[]): void ``` Adds one or more Lambda Layers to this Lambda function. ###### `layers`<sup>Required</sup> <a name="layers" id="cdk-sops-secrets.SopsSyncProvider.addLayers.parameter.layers"></a> - *Type:* ...aws-cdk-lib.aws_lambda.ILayerVersion[] the layers to be added. --- ##### `addMetadata` <a name="addMetadata" id="cdk-sops-secrets.SopsSyncProvider.addMetadata"></a> ```typescript public addMetadata(type: string, data: any, options?: MetadataOptions): void ``` Use this method to write to the construct tree. The metadata entries are written to the Cloud Assembly Manifest if the `treeMetadata` property is specified in the props of the App that contains this Construct. ###### `type`<sup>Required</sup> <a name="type" id="cdk-sops-secrets.SopsSyncProvider.addMetadata.parameter.type"></a> - *Type:* string --- ###### `data`<sup>Required</sup> <a name="data" id="cdk-sops-secrets.SopsSyncProvider.addMetadata.parameter.data"></a> - *Type:* any --- ###### `options`<sup>Optional</sup> <a name="options" id="cdk-sops-secrets.SopsSyncProvider.addMetadata.parameter.options"></a> - *Type:* constructs.MetadataOptions --- ##### `dependOn` <a name="dependOn" id="cdk-sops-secrets.SopsSyncProvider.dependOn"></a> ```typescript public dependOn(down: IConstruct): void ``` The SingletonFunction construct cannot be added as a dependency of another construct using node.addDependency(). Use this method instead to declare this as a dependency of another construct. ###### `down`<sup>Required</sup> <a name="down" id="cdk-sops-secrets.SopsSyncProvider.dependOn.parameter.down"></a> - *Type:* constructs.IConstruct --- ##### `addAgeKey` <a name="addAgeKey" id="cdk-sops-secret