1. Packages
  2. AWS Classic
  3. API Docs
  4. transfer
  5. Certificate

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

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

aws.transfer.Certificate

Explore with Pulumi AI

aws logo

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

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

    Provides a AWS Transfer AS2 Certificate resource.

    Example Usage

    Basic

    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Transfer.Certificate("example", new()
        {
            CertificateFile = File.ReadAllText($"{path.Module}/example.com/example.crt"),
            CertificateChain = File.ReadAllText($"{path.Module}/example.com/ca.crt"),
            PrivateKey = File.ReadAllText($"{path.Module}/example.com/example.key"),
            Description = "example",
            Usage = "SIGNING",
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    	"os"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := transfer.NewCertificate(ctx, "example", &transfer.CertificateArgs{
    			Certificate:      readFileOrPanic(fmt.Sprintf("%v/example.com/example.crt", path.Module)),
    			CertificateChain: readFileOrPanic(fmt.Sprintf("%v/example.com/ca.crt", path.Module)),
    			PrivateKey:       readFileOrPanic(fmt.Sprintf("%v/example.com/example.key", path.Module)),
    			Description:      pulumi.String("example"),
    			Usage:            pulumi.String("SIGNING"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.transfer.Certificate;
    import com.pulumi.aws.transfer.CertificateArgs;
    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 example = new Certificate("example", CertificateArgs.builder()        
                .certificate(Files.readString(Paths.get(String.format("%s/example.com/example.crt", path.module()))))
                .certificateChain(Files.readString(Paths.get(String.format("%s/example.com/ca.crt", path.module()))))
                .privateKey(Files.readString(Paths.get(String.format("%s/example.com/example.key", path.module()))))
                .description("example")
                .usage("SIGNING")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.transfer.Certificate("example",
        certificate=(lambda path: open(path).read())(f"{path['module']}/example.com/example.crt"),
        certificate_chain=(lambda path: open(path).read())(f"{path['module']}/example.com/ca.crt"),
        private_key=(lambda path: open(path).read())(f"{path['module']}/example.com/example.key"),
        description="example",
        usage="SIGNING")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as fs from "fs";
    
    const example = new aws.transfer.Certificate("example", {
        certificate: fs.readFileSync(`${path.module}/example.com/example.crt`),
        certificateChain: fs.readFileSync(`${path.module}/example.com/ca.crt`),
        privateKey: fs.readFileSync(`${path.module}/example.com/example.key`),
        description: "example",
        usage: "SIGNING",
    });
    
    resources:
      example:
        type: aws:transfer:Certificate
        properties:
          certificate:
            fn::readFile: ${path.module}/example.com/example.crt
          certificateChain:
            fn::readFile: ${path.module}/example.com/ca.crt
          privateKey:
            fn::readFile: ${path.module}/example.com/example.key
          description: example
          usage: SIGNING
    

    Create Certificate Resource

    new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
    @overload
    def Certificate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    certificate: Optional[str] = None,
                    certificate_chain: Optional[str] = None,
                    description: Optional[str] = None,
                    private_key: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    usage: Optional[str] = None)
    @overload
    def Certificate(resource_name: str,
                    args: CertificateArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewCertificate(ctx *Context, name string, args CertificateArgs, opts ...ResourceOption) (*Certificate, error)
    public Certificate(string name, CertificateArgs args, CustomResourceOptions? opts = null)
    public Certificate(String name, CertificateArgs args)
    public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
    
    type: aws:transfer:Certificate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CertificateArgs
    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 CertificateArgs
    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 CertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Certificate 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 Certificate resource accepts the following input properties:

    CertificateFile string

    The valid certificate file required for the transfer.

    Usage string

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    CertificateChain string

    The optional list of certificate that make up the chain for the certificate that is being imported.

    Description string

    A short description that helps identify the certificate.

    PrivateKey string

    The private key associated with the certificate being imported.

    Tags Dictionary<string, string>

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Certificate string

    The valid certificate file required for the transfer.

    Usage string

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    CertificateChain string

    The optional list of certificate that make up the chain for the certificate that is being imported.

    Description string

    A short description that helps identify the certificate.

    PrivateKey string

    The private key associated with the certificate being imported.

    Tags map[string]string

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    certificate String

    The valid certificate file required for the transfer.

    usage String

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    certificateChain String

    The optional list of certificate that make up the chain for the certificate that is being imported.

    description String

    A short description that helps identify the certificate.

    privateKey String

    The private key associated with the certificate being imported.

    tags Map<String,String>

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    certificate string

    The valid certificate file required for the transfer.

    usage string

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    certificateChain string

    The optional list of certificate that make up the chain for the certificate that is being imported.

    description string

    A short description that helps identify the certificate.

    privateKey string

    The private key associated with the certificate being imported.

    tags {[key: string]: string}

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    certificate str

    The valid certificate file required for the transfer.

    usage str

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    certificate_chain str

    The optional list of certificate that make up the chain for the certificate that is being imported.

    description str

    A short description that helps identify the certificate.

    private_key str

    The private key associated with the certificate being imported.

    tags Mapping[str, str]

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    certificate String

    The valid certificate file required for the transfer.

    usage String

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    certificateChain String

    The optional list of certificate that make up the chain for the certificate that is being imported.

    description String

    A short description that helps identify the certificate.

    privateKey String

    The private key associated with the certificate being imported.

    tags Map<String>

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    ActiveDate string

    An date when the certificate becomes active

    Arn string

    The ARN of the certificate

    CertificateId string

    The unique identifier for the AS2 certificate

    Id string

    The provider-assigned unique ID for this managed resource.

    InactiveDate string

    An date when the certificate becomes inactive

    TagsAll Dictionary<string, string>
    ActiveDate string

    An date when the certificate becomes active

    Arn string

    The ARN of the certificate

    CertificateId string

    The unique identifier for the AS2 certificate

    Id string

    The provider-assigned unique ID for this managed resource.

    InactiveDate string

    An date when the certificate becomes inactive

    TagsAll map[string]string
    activeDate String

    An date when the certificate becomes active

    arn String

    The ARN of the certificate

    certificateId String

    The unique identifier for the AS2 certificate

    id String

    The provider-assigned unique ID for this managed resource.

    inactiveDate String

    An date when the certificate becomes inactive

    tagsAll Map<String,String>
    activeDate string

    An date when the certificate becomes active

    arn string

    The ARN of the certificate

    certificateId string

    The unique identifier for the AS2 certificate

    id string

    The provider-assigned unique ID for this managed resource.

    inactiveDate string

    An date when the certificate becomes inactive

    tagsAll {[key: string]: string}
    active_date str

    An date when the certificate becomes active

    arn str

    The ARN of the certificate

    certificate_id str

    The unique identifier for the AS2 certificate

    id str

    The provider-assigned unique ID for this managed resource.

    inactive_date str

    An date when the certificate becomes inactive

    tags_all Mapping[str, str]
    activeDate String

    An date when the certificate becomes active

    arn String

    The ARN of the certificate

    certificateId String

    The unique identifier for the AS2 certificate

    id String

    The provider-assigned unique ID for this managed resource.

    inactiveDate String

    An date when the certificate becomes inactive

    tagsAll Map<String>

    Look up Existing Certificate Resource

    Get an existing Certificate 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?: CertificateState, opts?: CustomResourceOptions): Certificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active_date: Optional[str] = None,
            arn: Optional[str] = None,
            certificate: Optional[str] = None,
            certificate_chain: Optional[str] = None,
            certificate_id: Optional[str] = None,
            description: Optional[str] = None,
            inactive_date: Optional[str] = None,
            private_key: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            usage: Optional[str] = None) -> Certificate
    func GetCertificate(ctx *Context, name string, id IDInput, state *CertificateState, opts ...ResourceOption) (*Certificate, error)
    public static Certificate Get(string name, Input<string> id, CertificateState? state, CustomResourceOptions? opts = null)
    public static Certificate get(String name, Output<String> id, CertificateState 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:
    ActiveDate string

    An date when the certificate becomes active

    Arn string

    The ARN of the certificate

    CertificateChain string

    The optional list of certificate that make up the chain for the certificate that is being imported.

    CertificateFile string

    The valid certificate file required for the transfer.

    CertificateId string

    The unique identifier for the AS2 certificate

    Description string

    A short description that helps identify the certificate.

    InactiveDate string

    An date when the certificate becomes inactive

    PrivateKey string

    The private key associated with the certificate being imported.

    Tags Dictionary<string, string>

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TagsAll Dictionary<string, string>
    Usage string

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    ActiveDate string

    An date when the certificate becomes active

    Arn string

    The ARN of the certificate

    Certificate string

    The valid certificate file required for the transfer.

    CertificateChain string

    The optional list of certificate that make up the chain for the certificate that is being imported.

    CertificateId string

    The unique identifier for the AS2 certificate

    Description string

    A short description that helps identify the certificate.

    InactiveDate string

    An date when the certificate becomes inactive

    PrivateKey string

    The private key associated with the certificate being imported.

    Tags map[string]string

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TagsAll map[string]string
    Usage string

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    activeDate String

    An date when the certificate becomes active

    arn String

    The ARN of the certificate

    certificate String

    The valid certificate file required for the transfer.

    certificateChain String

    The optional list of certificate that make up the chain for the certificate that is being imported.

    certificateId String

    The unique identifier for the AS2 certificate

    description String

    A short description that helps identify the certificate.

    inactiveDate String

    An date when the certificate becomes inactive

    privateKey String

    The private key associated with the certificate being imported.

    tags Map<String,String>

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll Map<String,String>
    usage String

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    activeDate string

    An date when the certificate becomes active

    arn string

    The ARN of the certificate

    certificate string

    The valid certificate file required for the transfer.

    certificateChain string

    The optional list of certificate that make up the chain for the certificate that is being imported.

    certificateId string

    The unique identifier for the AS2 certificate

    description string

    A short description that helps identify the certificate.

    inactiveDate string

    An date when the certificate becomes inactive

    privateKey string

    The private key associated with the certificate being imported.

    tags {[key: string]: string}

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll {[key: string]: string}
    usage string

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    active_date str

    An date when the certificate becomes active

    arn str

    The ARN of the certificate

    certificate str

    The valid certificate file required for the transfer.

    certificate_chain str

    The optional list of certificate that make up the chain for the certificate that is being imported.

    certificate_id str

    The unique identifier for the AS2 certificate

    description str

    A short description that helps identify the certificate.

    inactive_date str

    An date when the certificate becomes inactive

    private_key str

    The private key associated with the certificate being imported.

    tags Mapping[str, str]

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tags_all Mapping[str, str]
    usage str

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    activeDate String

    An date when the certificate becomes active

    arn String

    The ARN of the certificate

    certificate String

    The valid certificate file required for the transfer.

    certificateChain String

    The optional list of certificate that make up the chain for the certificate that is being imported.

    certificateId String

    The unique identifier for the AS2 certificate

    description String

    A short description that helps identify the certificate.

    inactiveDate String

    An date when the certificate becomes inactive

    privateKey String

    The private key associated with the certificate being imported.

    tags Map<String>

    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll Map<String>
    usage String

    Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.

    Import

    Using pulumi import, import Transfer AS2 Certificate using the certificate_id. For example:

     $ pulumi import aws:transfer/certificate:Certificate example c-4221a88afd5f4362a
    

    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.2.0 published on Monday, Sep 18, 2023 by Pulumi