aws-cdk-lib.aws_signer.SigningProfile

class SigningProfile (construct)

LanguageType name
.NETAmazon.CDK.AWS.Signer.SigningProfile
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssigner#SigningProfile
Javasoftware.amazon.awscdk.services.signer.SigningProfile
Pythonaws_cdk.aws_signer.SigningProfile
TypeScript (source)aws-cdk-lib » aws_signer » SigningProfile

Implements IConstruct, IDependable, IResource, ISigningProfile

Defines a Signing Profile.

Example

import * as signer from 'aws-cdk-lib/aws-signer';

const signingProfile = new signer.SigningProfile(this, 'SigningProfile', {
  platform: signer.Platform.AWS_LAMBDA_SHA384_ECDSA,
});

const codeSigningConfig = new lambda.CodeSigningConfig(this, 'CodeSigningConfig', {
  signingProfiles: [signingProfile],
});

new lambda.Function(this, 'Function', {
  codeSigningConfig,
  runtime: lambda.Runtime.NODEJS_18_X,
  handler: 'index.handler',
  code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
});

Initializer

new SigningProfile(scope: Construct, id: string, props: SigningProfileProps)

Parameters

  • scope Construct
  • id string
  • props SigningProfileProps

Construct Props

NameTypeDescription
platformPlatformThe Signing Platform available for signing profile.
signatureValidity?DurationThe validity period for signatures generated using this signing profile.
signingProfileName?stringPhysical name of this Signing Profile.

platform

Type: Platform

The Signing Platform available for signing profile.

See also: https://docs.aws.amazon.com/signer/latest/developerguide/gs-platform.html


signatureValidity?

Type: Duration (optional, default: 135 months)

The validity period for signatures generated using this signing profile.


signingProfileName?

Type: string (optional, default: Assigned by CloudFormation (recommended).)

Physical name of this Signing Profile.

Properties

NameTypeDescription
envResourceEnvironmentThe environment this resource belongs to.
nodeNodeThe tree node.
signingProfileArnstringThe ARN of the signing profile.
signingProfileNamestringThe name of signing profile.
signingProfileVersionstringThe version of signing profile.
signingProfileVersionArnstringThe ARN of signing profile version.
stackStackThe stack in which this resource is defined.

env

Type: 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.


node

Type: Node

The tree node.


signingProfileArn

Type: string

The ARN of the signing profile.


signingProfileName

Type: string

The name of signing profile.


signingProfileVersion

Type: string

The version of signing profile.


signingProfileVersionArn

Type: string

The ARN of signing profile version.


stack

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
applyRemovalPolicy(policy)Apply the given removal policy to this resource.
toString()Returns a string representation of this construct.
static fromSigningProfileAttributes(scope, id, attrs)Creates a Signing Profile construct that represents an external Signing Profile.

applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

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).


toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromSigningProfileAttributes(scope, id, attrs)

public static fromSigningProfileAttributes(scope: Construct, id: string, attrs: SigningProfileAttributes): ISigningProfile

Parameters

  • scope Construct — The parent creating construct (usually this).
  • id string — The construct's name.
  • attrs SigningProfileAttributes — A SigningProfileAttributes object.

Returns

  • ISigningProfile

Creates a Signing Profile construct that represents an external Signing Profile.