Try AWS Native preview for resources not in the classic version.
aws.transfer.Certificate
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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:
- Certificate
File 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.
- Certificate
Chain 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.
- Private
Key string The private key associated with the certificate being imported.
- 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.
- Certificate
Chain 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.
- Private
Key string The private key associated with the certificate being imported.
- 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.
- certificate
Chain 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.
- private
Key String The private key associated with the certificate being imported.
- 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.
- certificate
Chain 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.
- private
Key string The private key associated with the certificate being imported.
- {[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.
- 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.
- certificate
Chain 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.
- private
Key String The private key associated with the certificate being imported.
- 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:
- Active
Date string An date when the certificate becomes active
- Arn string
The ARN of the certificate
- Certificate
Id string The unique identifier for the AS2 certificate
- Id string
The provider-assigned unique ID for this managed resource.
- Inactive
Date string An date when the certificate becomes inactive
- Dictionary<string, string>
- Active
Date string An date when the certificate becomes active
- Arn string
The ARN of the certificate
- Certificate
Id string The unique identifier for the AS2 certificate
- Id string
The provider-assigned unique ID for this managed resource.
- Inactive
Date string An date when the certificate becomes inactive
- map[string]string
- active
Date String An date when the certificate becomes active
- arn String
The ARN of the certificate
- certificate
Id String The unique identifier for the AS2 certificate
- id String
The provider-assigned unique ID for this managed resource.
- inactive
Date String An date when the certificate becomes inactive
- Map<String,String>
- active
Date string An date when the certificate becomes active
- arn string
The ARN of the certificate
- certificate
Id string The unique identifier for the AS2 certificate
- id string
The provider-assigned unique ID for this managed resource.
- inactive
Date string An date when the certificate becomes inactive
- {[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
- Mapping[str, str]
- active
Date String An date when the certificate becomes active
- arn String
The ARN of the certificate
- certificate
Id String The unique identifier for the AS2 certificate
- id String
The provider-assigned unique ID for this managed resource.
- inactive
Date String An date when the certificate becomes inactive
- 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.
- Active
Date string An date when the certificate becomes active
- Arn string
The ARN of the certificate
- Certificate
Chain string The optional list of certificate that make up the chain for the certificate that is being imported.
- Certificate
File string The valid certificate file required for the transfer.
- Certificate
Id string The unique identifier for the AS2 certificate
- Description string
A short description that helps identify the certificate.
- Inactive
Date string An date when the certificate becomes inactive
- Private
Key string The private key associated with the certificate being imported.
- 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.- Dictionary<string, string>
- Usage string
Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.
- Active
Date 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.
- Certificate
Chain string The optional list of certificate that make up the chain for the certificate that is being imported.
- Certificate
Id string The unique identifier for the AS2 certificate
- Description string
A short description that helps identify the certificate.
- Inactive
Date string An date when the certificate becomes inactive
- Private
Key string The private key associated with the certificate being imported.
- 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.- map[string]string
- Usage string
Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.
- active
Date 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.
- certificate
Chain String The optional list of certificate that make up the chain for the certificate that is being imported.
- certificate
Id String The unique identifier for the AS2 certificate
- description String
A short description that helps identify the certificate.
- inactive
Date String An date when the certificate becomes inactive
- private
Key String The private key associated with the certificate being imported.
- 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.- Map<String,String>
- usage String
Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.
- active
Date 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.
- certificate
Chain string The optional list of certificate that make up the chain for the certificate that is being imported.
- certificate
Id string The unique identifier for the AS2 certificate
- description string
A short description that helps identify the certificate.
- inactive
Date string An date when the certificate becomes inactive
- private
Key string The private key associated with the certificate being imported.
- {[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.- {[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.
- 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.- Mapping[str, str]
- usage str
Specifies if a certificate is being used for signing or encryption. The valid values are SIGNING and ENCRYPTION.
- active
Date 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.
- certificate
Chain String The optional list of certificate that make up the chain for the certificate that is being imported.
- certificate
Id String The unique identifier for the AS2 certificate
- description String
A short description that helps identify the certificate.
- inactive
Date String An date when the certificate becomes inactive
- private
Key String The private key associated with the certificate being imported.
- 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.- 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.
Try AWS Native preview for resources not in the classic version.