1. Packages
  2. AWS Classic
  3. API Docs
  4. lambda
  5. CodeSigningConfig

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

aws.lambda.CodeSigningConfig

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    Provides a Lambda Code Signing Config resource. A code signing configuration defines a list of allowed signing profiles and defines the code-signing validation policy (action to be taken if deployment validation checks fail).

    For information about Lambda code signing configurations and how to use them, see configuring code signing for Lambda functions

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const newCsc = new aws.lambda.CodeSigningConfig("new_csc", {
        allowedPublishers: {
            signingProfileVersionArns: [
                example1.arn,
                example2.arn,
            ],
        },
        policies: {
            untrustedArtifactOnDeployment: "Warn",
        },
        description: "My awesome code signing config.",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    new_csc = aws.lambda_.CodeSigningConfig("new_csc",
        allowed_publishers=aws.lambda_.CodeSigningConfigAllowedPublishersArgs(
            signing_profile_version_arns=[
                example1["arn"],
                example2["arn"],
            ],
        ),
        policies=aws.lambda_.CodeSigningConfigPoliciesArgs(
            untrusted_artifact_on_deployment="Warn",
        ),
        description="My awesome code signing config.")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewCodeSigningConfig(ctx, "new_csc", &lambda.CodeSigningConfigArgs{
    			AllowedPublishers: &lambda.CodeSigningConfigAllowedPublishersArgs{
    				SigningProfileVersionArns: pulumi.StringArray{
    					example1.Arn,
    					example2.Arn,
    				},
    			},
    			Policies: &lambda.CodeSigningConfigPoliciesArgs{
    				UntrustedArtifactOnDeployment: pulumi.String("Warn"),
    			},
    			Description: pulumi.String("My awesome code signing config."),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var newCsc = new Aws.Lambda.CodeSigningConfig("new_csc", new()
        {
            AllowedPublishers = new Aws.Lambda.Inputs.CodeSigningConfigAllowedPublishersArgs
            {
                SigningProfileVersionArns = new[]
                {
                    example1.Arn,
                    example2.Arn,
                },
            },
            Policies = new Aws.Lambda.Inputs.CodeSigningConfigPoliciesArgs
            {
                UntrustedArtifactOnDeployment = "Warn",
            },
            Description = "My awesome code signing config.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lambda.CodeSigningConfig;
    import com.pulumi.aws.lambda.CodeSigningConfigArgs;
    import com.pulumi.aws.lambda.inputs.CodeSigningConfigAllowedPublishersArgs;
    import com.pulumi.aws.lambda.inputs.CodeSigningConfigPoliciesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var newCsc = new CodeSigningConfig("newCsc", CodeSigningConfigArgs.builder()
                .allowedPublishers(CodeSigningConfigAllowedPublishersArgs.builder()
                    .signingProfileVersionArns(                
                        example1.arn(),
                        example2.arn())
                    .build())
                .policies(CodeSigningConfigPoliciesArgs.builder()
                    .untrustedArtifactOnDeployment("Warn")
                    .build())
                .description("My awesome code signing config.")
                .build());
    
        }
    }
    
    resources:
      newCsc:
        type: aws:lambda:CodeSigningConfig
        name: new_csc
        properties:
          allowedPublishers:
            signingProfileVersionArns:
              - ${example1.arn}
              - ${example2.arn}
          policies:
            untrustedArtifactOnDeployment: Warn
          description: My awesome code signing config.
    

    Create CodeSigningConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CodeSigningConfig(name: string, args: CodeSigningConfigArgs, opts?: CustomResourceOptions);
    @overload
    def CodeSigningConfig(resource_name: str,
                          args: CodeSigningConfigArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def CodeSigningConfig(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          allowed_publishers: Optional[_lambda_.CodeSigningConfigAllowedPublishersArgs] = None,
                          description: Optional[str] = None,
                          policies: Optional[_lambda_.CodeSigningConfigPoliciesArgs] = None)
    func NewCodeSigningConfig(ctx *Context, name string, args CodeSigningConfigArgs, opts ...ResourceOption) (*CodeSigningConfig, error)
    public CodeSigningConfig(string name, CodeSigningConfigArgs args, CustomResourceOptions? opts = null)
    public CodeSigningConfig(String name, CodeSigningConfigArgs args)
    public CodeSigningConfig(String name, CodeSigningConfigArgs args, CustomResourceOptions options)
    
    type: aws:lambda:CodeSigningConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CodeSigningConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CodeSigningConfigArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CodeSigningConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CodeSigningConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CodeSigningConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var codeSigningConfigResource = new Aws.Lambda.CodeSigningConfig("codeSigningConfigResource", new()
    {
        AllowedPublishers = new Aws.Lambda.Inputs.CodeSigningConfigAllowedPublishersArgs
        {
            SigningProfileVersionArns = new[]
            {
                "string",
            },
        },
        Description = "string",
        Policies = new Aws.Lambda.Inputs.CodeSigningConfigPoliciesArgs
        {
            UntrustedArtifactOnDeployment = "string",
        },
    });
    
    example, err := lambda.NewCodeSigningConfig(ctx, "codeSigningConfigResource", &lambda.CodeSigningConfigArgs{
    	AllowedPublishers: &lambda.CodeSigningConfigAllowedPublishersArgs{
    		SigningProfileVersionArns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Description: pulumi.String("string"),
    	Policies: &lambda.CodeSigningConfigPoliciesArgs{
    		UntrustedArtifactOnDeployment: pulumi.String("string"),
    	},
    })
    
    var codeSigningConfigResource = new CodeSigningConfig("codeSigningConfigResource", CodeSigningConfigArgs.builder()
        .allowedPublishers(CodeSigningConfigAllowedPublishersArgs.builder()
            .signingProfileVersionArns("string")
            .build())
        .description("string")
        .policies(CodeSigningConfigPoliciesArgs.builder()
            .untrustedArtifactOnDeployment("string")
            .build())
        .build());
    
    code_signing_config_resource = aws.lambda_.CodeSigningConfig("codeSigningConfigResource",
        allowed_publishers=aws.lambda_.CodeSigningConfigAllowedPublishersArgs(
            signing_profile_version_arns=["string"],
        ),
        description="string",
        policies=aws.lambda_.CodeSigningConfigPoliciesArgs(
            untrusted_artifact_on_deployment="string",
        ))
    
    const codeSigningConfigResource = new aws.lambda.CodeSigningConfig("codeSigningConfigResource", {
        allowedPublishers: {
            signingProfileVersionArns: ["string"],
        },
        description: "string",
        policies: {
            untrustedArtifactOnDeployment: "string",
        },
    });
    
    type: aws:lambda:CodeSigningConfig
    properties:
        allowedPublishers:
            signingProfileVersionArns:
                - string
        description: string
        policies:
            untrustedArtifactOnDeployment: string
    

    CodeSigningConfig Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The CodeSigningConfig resource accepts the following input properties:

    AllowedPublishers CodeSigningConfigAllowedPublishers
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    Description string
    Descriptive name for this code signing configuration.
    Policies CodeSigningConfigPolicies
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    AllowedPublishers CodeSigningConfigAllowedPublishersArgs
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    Description string
    Descriptive name for this code signing configuration.
    Policies CodeSigningConfigPoliciesArgs
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowedPublishers CodeSigningConfigAllowedPublishers
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    description String
    Descriptive name for this code signing configuration.
    policies CodeSigningConfigPolicies
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowedPublishers CodeSigningConfigAllowedPublishers
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    description string
    Descriptive name for this code signing configuration.
    policies CodeSigningConfigPolicies
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowed_publishers lambda_.CodeSigningConfigAllowedPublishersArgs
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    description str
    Descriptive name for this code signing configuration.
    policies lambda_.CodeSigningConfigPoliciesArgs
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowedPublishers Property Map
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    description String
    Descriptive name for this code signing configuration.
    policies Property Map
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CodeSigningConfig resource produces the following output properties:

    Arn string
    The Amazon Resource Name (ARN) of the code signing configuration.
    ConfigId string
    Unique identifier for the code signing configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The date and time that the code signing configuration was last modified.
    Arn string
    The Amazon Resource Name (ARN) of the code signing configuration.
    ConfigId string
    Unique identifier for the code signing configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The date and time that the code signing configuration was last modified.
    arn String
    The Amazon Resource Name (ARN) of the code signing configuration.
    configId String
    Unique identifier for the code signing configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The date and time that the code signing configuration was last modified.
    arn string
    The Amazon Resource Name (ARN) of the code signing configuration.
    configId string
    Unique identifier for the code signing configuration.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified string
    The date and time that the code signing configuration was last modified.
    arn str
    The Amazon Resource Name (ARN) of the code signing configuration.
    config_id str
    Unique identifier for the code signing configuration.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified str
    The date and time that the code signing configuration was last modified.
    arn String
    The Amazon Resource Name (ARN) of the code signing configuration.
    configId String
    Unique identifier for the code signing configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The date and time that the code signing configuration was last modified.

    Look up Existing CodeSigningConfig Resource

    Get an existing CodeSigningConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CodeSigningConfigState, opts?: CustomResourceOptions): CodeSigningConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allowed_publishers: Optional[_lambda_.CodeSigningConfigAllowedPublishersArgs] = None,
            arn: Optional[str] = None,
            config_id: Optional[str] = None,
            description: Optional[str] = None,
            last_modified: Optional[str] = None,
            policies: Optional[_lambda_.CodeSigningConfigPoliciesArgs] = None) -> CodeSigningConfig
    func GetCodeSigningConfig(ctx *Context, name string, id IDInput, state *CodeSigningConfigState, opts ...ResourceOption) (*CodeSigningConfig, error)
    public static CodeSigningConfig Get(string name, Input<string> id, CodeSigningConfigState? state, CustomResourceOptions? opts = null)
    public static CodeSigningConfig get(String name, Output<String> id, CodeSigningConfigState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AllowedPublishers CodeSigningConfigAllowedPublishers
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    Arn string
    The Amazon Resource Name (ARN) of the code signing configuration.
    ConfigId string
    Unique identifier for the code signing configuration.
    Description string
    Descriptive name for this code signing configuration.
    LastModified string
    The date and time that the code signing configuration was last modified.
    Policies CodeSigningConfigPolicies
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    AllowedPublishers CodeSigningConfigAllowedPublishersArgs
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    Arn string
    The Amazon Resource Name (ARN) of the code signing configuration.
    ConfigId string
    Unique identifier for the code signing configuration.
    Description string
    Descriptive name for this code signing configuration.
    LastModified string
    The date and time that the code signing configuration was last modified.
    Policies CodeSigningConfigPoliciesArgs
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowedPublishers CodeSigningConfigAllowedPublishers
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    arn String
    The Amazon Resource Name (ARN) of the code signing configuration.
    configId String
    Unique identifier for the code signing configuration.
    description String
    Descriptive name for this code signing configuration.
    lastModified String
    The date and time that the code signing configuration was last modified.
    policies CodeSigningConfigPolicies
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowedPublishers CodeSigningConfigAllowedPublishers
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    arn string
    The Amazon Resource Name (ARN) of the code signing configuration.
    configId string
    Unique identifier for the code signing configuration.
    description string
    Descriptive name for this code signing configuration.
    lastModified string
    The date and time that the code signing configuration was last modified.
    policies CodeSigningConfigPolicies
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowed_publishers lambda_.CodeSigningConfigAllowedPublishersArgs
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    arn str
    The Amazon Resource Name (ARN) of the code signing configuration.
    config_id str
    Unique identifier for the code signing configuration.
    description str
    Descriptive name for this code signing configuration.
    last_modified str
    The date and time that the code signing configuration was last modified.
    policies lambda_.CodeSigningConfigPoliciesArgs
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
    allowedPublishers Property Map
    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
    arn String
    The Amazon Resource Name (ARN) of the code signing configuration.
    configId String
    Unique identifier for the code signing configuration.
    description String
    Descriptive name for this code signing configuration.
    lastModified String
    The date and time that the code signing configuration was last modified.
    policies Property Map
    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    Supporting Types

    CodeSigningConfigAllowedPublishers, CodeSigningConfigAllowedPublishersArgs

    SigningProfileVersionArns List<string>
    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
    SigningProfileVersionArns []string
    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
    signingProfileVersionArns List<String>
    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
    signingProfileVersionArns string[]
    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
    signing_profile_version_arns Sequence[str]
    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
    signingProfileVersionArns List<String>
    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.

    CodeSigningConfigPolicies, CodeSigningConfigPoliciesArgs

    UntrustedArtifactOnDeployment string
    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.
    UntrustedArtifactOnDeployment string
    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.
    untrustedArtifactOnDeployment String
    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.
    untrustedArtifactOnDeployment string
    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.
    untrusted_artifact_on_deployment str
    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.
    untrustedArtifactOnDeployment String
    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.

    Import

    Using pulumi import, import Code Signing Configs using their ARN. For example:

    $ pulumi import aws:lambda/codeSigningConfig:CodeSigningConfig imported_csc arn:aws:lambda:us-west-2:123456789012:code-signing-config:csc-0f6c334abcdea4d8b
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi