1. Packages
  2. AWS
  3. API Docs
  4. lightsail
  5. Certificate
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.lightsail.Certificate

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a lightsail certificate.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Certificate("test", {
        name: "test",
        domainName: "testdomain.com",
        subjectAlternativeNames: ["www.testdomain.com"],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Certificate("test",
        name="test",
        domain_name="testdomain.com",
        subject_alternative_names=["www.testdomain.com"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewCertificate(ctx, "test", &lightsail.CertificateArgs{
    			Name:       pulumi.String("test"),
    			DomainName: pulumi.String("testdomain.com"),
    			SubjectAlternativeNames: pulumi.StringArray{
    				pulumi.String("www.testdomain.com"),
    			},
    		})
    		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 test = new Aws.LightSail.Certificate("test", new()
        {
            Name = "test",
            DomainName = "testdomain.com",
            SubjectAlternativeNames = new[]
            {
                "www.testdomain.com",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Certificate;
    import com.pulumi.aws.lightsail.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 test = new Certificate("test", CertificateArgs.builder()
                .name("test")
                .domainName("testdomain.com")
                .subjectAlternativeNames("www.testdomain.com")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:Certificate
        properties:
          name: test
          domainName: testdomain.com
          subjectAlternativeNames:
            - www.testdomain.com
    

    Create Certificate Resource

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

    Constructor syntax

    new Certificate(name: string, args?: CertificateArgs, opts?: CustomResourceOptions);
    @overload
    def Certificate(resource_name: str,
                    args: Optional[CertificateArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Certificate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    domain_name: Optional[str] = None,
                    name: Optional[str] = None,
                    subject_alternative_names: Optional[Sequence[str]] = None,
                    tags: Optional[Mapping[str, str]] = None)
    func NewCertificate(ctx *Context, name string, args *CertificateArgs, opts ...ResourceOption) (*Certificate, error)
    public Certificate(string name, CertificateArgs? args = null, CustomResourceOptions? opts = null)
    public Certificate(String name, CertificateArgs args)
    public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
    
    type: aws:lightsail:Certificate
    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 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.

    Constructor example

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

    var examplecertificateResourceResourceFromLightsailcertificate = new Aws.LightSail.Certificate("examplecertificateResourceResourceFromLightsailcertificate", new()
    {
        DomainName = "string",
        Name = "string",
        SubjectAlternativeNames = new[]
        {
            "string",
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := lightsail.NewCertificate(ctx, "examplecertificateResourceResourceFromLightsailcertificate", &lightsail.CertificateArgs{
    	DomainName: pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	SubjectAlternativeNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var examplecertificateResourceResourceFromLightsailcertificate = new Certificate("examplecertificateResourceResourceFromLightsailcertificate", CertificateArgs.builder()
        .domainName("string")
        .name("string")
        .subjectAlternativeNames("string")
        .tags(Map.of("string", "string"))
        .build());
    
    examplecertificate_resource_resource_from_lightsailcertificate = aws.lightsail.Certificate("examplecertificateResourceResourceFromLightsailcertificate",
        domain_name="string",
        name="string",
        subject_alternative_names=["string"],
        tags={
            "string": "string",
        })
    
    const examplecertificateResourceResourceFromLightsailcertificate = new aws.lightsail.Certificate("examplecertificateResourceResourceFromLightsailcertificate", {
        domainName: "string",
        name: "string",
        subjectAlternativeNames: ["string"],
        tags: {
            string: "string",
        },
    });
    
    type: aws:lightsail:Certificate
    properties:
        domainName: string
        name: string
        subjectAlternativeNames:
            - string
        tags:
            string: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Certificate resource accepts the following input properties:

    DomainName string
    A domain name for which the certificate should be issued.
    Name string
    The name of the Lightsail load balancer.
    SubjectAlternativeNames List<string>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    DomainName string
    A domain name for which the certificate should be issued.
    Name string
    The name of the Lightsail load balancer.
    SubjectAlternativeNames []string
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    Tags map[string]string
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    domainName String
    A domain name for which the certificate should be issued.
    name String
    The name of the Lightsail load balancer.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags Map<String,String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    domainName string
    A domain name for which the certificate should be issued.
    name string
    The name of the Lightsail load balancer.
    subjectAlternativeNames string[]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags {[key: string]: string}
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    domain_name str
    A domain name for which the certificate should be issued.
    name str
    The name of the Lightsail load balancer.
    subject_alternative_names Sequence[str]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags Mapping[str, str]
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    domainName String
    A domain name for which the certificate should be issued.
    name String
    The name of the Lightsail load balancer.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags Map<String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. 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:

    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainValidationOptions List<CertificateDomainValidationOption>
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainValidationOptions []CertificateDomainValidationOption
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainValidationOptions List<CertificateDomainValidationOption>
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the lightsail certificate.
    createdAt string
    The timestamp when the instance was created.
    domainValidationOptions CertificateDomainValidationOption[]
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the lightsail certificate.
    created_at str
    The timestamp when the instance was created.
    domain_validation_options Sequence[CertificateDomainValidationOption]
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainValidationOptions List<Property Map>
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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,
            arn: Optional[str] = None,
            created_at: Optional[str] = None,
            domain_name: Optional[str] = None,
            domain_validation_options: Optional[Sequence[CertificateDomainValidationOptionArgs]] = None,
            name: Optional[str] = None,
            subject_alternative_names: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, 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:
    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainName string
    A domain name for which the certificate should be issued.
    DomainValidationOptions List<CertificateDomainValidationOption>
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    Name string
    The name of the Lightsail load balancer.
    SubjectAlternativeNames List<string>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. 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>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the lightsail certificate.
    CreatedAt string
    The timestamp when the instance was created.
    DomainName string
    A domain name for which the certificate should be issued.
    DomainValidationOptions []CertificateDomainValidationOptionArgs
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    Name string
    The name of the Lightsail load balancer.
    SubjectAlternativeNames []string
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    Tags map[string]string
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. 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
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainName String
    A domain name for which the certificate should be issued.
    domainValidationOptions List<CertificateDomainValidationOption>
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    name String
    The name of the Lightsail load balancer.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags Map<String,String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. 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>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the lightsail certificate.
    createdAt string
    The timestamp when the instance was created.
    domainName string
    A domain name for which the certificate should be issued.
    domainValidationOptions CertificateDomainValidationOption[]
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    name string
    The name of the Lightsail load balancer.
    subjectAlternativeNames string[]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags {[key: string]: string}
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. 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}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the lightsail certificate.
    created_at str
    The timestamp when the instance was created.
    domain_name str
    A domain name for which the certificate should be issued.
    domain_validation_options Sequence[CertificateDomainValidationOptionArgs]
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    name str
    The name of the Lightsail load balancer.
    subject_alternative_names Sequence[str]
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags Mapping[str, str]
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. 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]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the lightsail certificate.
    createdAt String
    The timestamp when the instance was created.
    domainName String
    A domain name for which the certificate should be issued.
    domainValidationOptions List<Property Map>
    Set of domain validation objects which can be used to complete certificate validation. Can have more than one element, e.g., if SANs are defined.
    name String
    The name of the Lightsail load balancer.
    subjectAlternativeNames List<String>
    Set of domains that should be SANs in the issued certificate. domain_name attribute is automatically added as a Subject Alternative Name.
    tags Map<String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. 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>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Supporting Types

    CertificateDomainValidationOption, CertificateDomainValidationOptionArgs

    DomainName string
    A domain name for which the certificate should be issued.
    ResourceRecordName string
    ResourceRecordType string
    ResourceRecordValue string
    DomainName string
    A domain name for which the certificate should be issued.
    ResourceRecordName string
    ResourceRecordType string
    ResourceRecordValue string
    domainName String
    A domain name for which the certificate should be issued.
    resourceRecordName String
    resourceRecordType String
    resourceRecordValue String
    domainName string
    A domain name for which the certificate should be issued.
    resourceRecordName string
    resourceRecordType string
    resourceRecordValue string
    domain_name str
    A domain name for which the certificate should be issued.
    resource_record_name str
    resource_record_type str
    resource_record_value str
    domainName String
    A domain name for which the certificate should be issued.
    resourceRecordName String
    resourceRecordType String
    resourceRecordValue String

    Import

    Using pulumi import, import aws_lightsail_certificate using the certificate name. For example:

    $ pulumi import aws:lightsail/certificate:Certificate test CertificateName
    

    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
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi