aws.lightsail.Certificate
Explore with Pulumi AI
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:
- Domain
Name string - A domain name for which the certificate should be issued.
- Name string
- The name of the Lightsail load balancer.
- Subject
Alternative List<string>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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.
- Domain
Name string - A domain name for which the certificate should be issued.
- Name string
- The name of the Lightsail load balancer.
- Subject
Alternative []stringNames - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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.
- domain
Name String - A domain name for which the certificate should be issued.
- name String
- The name of the Lightsail load balancer.
- subject
Alternative List<String>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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.
- domain
Name string - A domain name for which the certificate should be issued.
- name string
- The name of the Lightsail load balancer.
- subject
Alternative string[]Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - {[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_ Sequence[str]names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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.
- domain
Name String - A domain name for which the certificate should be issued.
- name String
- The name of the Lightsail load balancer.
- subject
Alternative List<String>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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.
- Created
At string - The timestamp when the instance was created.
- Domain
Validation List<CertificateOptions Domain Validation Option> - 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.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN of the lightsail certificate.
- Created
At string - The timestamp when the instance was created.
- Domain
Validation []CertificateOptions Domain Validation Option - 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.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the lightsail certificate.
- created
At String - The timestamp when the instance was created.
- domain
Validation List<CertificateOptions Domain Validation Option> - 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.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN of the lightsail certificate.
- created
At string - The timestamp when the instance was created.
- domain
Validation CertificateOptions Domain Validation Option[] - 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.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The ARN of the lightsail certificate.
- created_
at str - The timestamp when the instance was created.
- domain_
validation_ Sequence[Certificateoptions Domain Validation Option] - 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.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the lightsail certificate.
- created
At String - The timestamp when the instance was created.
- domain
Validation List<Property Map>Options - 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.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- Arn string
- The ARN of the lightsail certificate.
- Created
At string - The timestamp when the instance was created.
- Domain
Name string - A domain name for which the certificate should be issued.
- Domain
Validation List<CertificateOptions Domain Validation Option> - 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.
- Subject
Alternative List<string>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN of the lightsail certificate.
- Created
At string - The timestamp when the instance was created.
- Domain
Name string - A domain name for which the certificate should be issued.
- Domain
Validation []CertificateOptions Domain Validation Option Args - 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.
- Subject
Alternative []stringNames - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the lightsail certificate.
- created
At String - The timestamp when the instance was created.
- domain
Name String - A domain name for which the certificate should be issued.
- domain
Validation List<CertificateOptions Domain Validation Option> - 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.
- subject
Alternative List<String>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN of the lightsail certificate.
- created
At string - The timestamp when the instance was created.
- domain
Name string - A domain name for which the certificate should be issued.
- domain
Validation CertificateOptions Domain Validation Option[] - 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.
- subject
Alternative string[]Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- 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_ Sequence[Certificateoptions Domain Validation Option Args] - 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_ Sequence[str]names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the lightsail certificate.
- created
At String - The timestamp when the instance was created.
- domain
Name String - A domain name for which the certificate should be issued.
- domain
Validation List<Property Map>Options - 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.
- subject
Alternative List<String>Names - Set of domains that should be SANs in the issued certificate.
domain_name
attribute is automatically added as a Subject Alternative Name. - 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
CertificateDomainValidationOption, CertificateDomainValidationOptionArgs
- Domain
Name string - A domain name for which the certificate should be issued.
- Resource
Record stringName - Resource
Record stringType - Resource
Record stringValue
- Domain
Name string - A domain name for which the certificate should be issued.
- Resource
Record stringName - Resource
Record stringType - Resource
Record stringValue
- domain
Name String - A domain name for which the certificate should be issued.
- resource
Record StringName - resource
Record StringType - resource
Record StringValue
- domain
Name string - A domain name for which the certificate should be issued.
- resource
Record stringName - resource
Record stringType - resource
Record stringValue
- domain_
name str - A domain name for which the certificate should be issued.
- resource_
record_ strname - resource_
record_ strtype - resource_
record_ strvalue
- domain
Name String - A domain name for which the certificate should be issued.
- resource
Record StringName - resource
Record StringType - resource
Record StringValue
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.