Certificate
Provides a CAS Certificate resource.
NOTE: The Certificate name which you want to add must be already registered and had not added by another account. Every Certificate name can only exist in a unique group.
NOTE: The Cas Certificate region only support cn-hangzhou, ap-south-1, me-east-1, eu-central-1, ap-northeast-1, ap-southeast-2.
NOTE: Available in 1.35.0+ .
Example Usage
using System.IO;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
// Add a new Certificate.
var cert = new AliCloud.Cas.Certificate("cert", new AliCloud.Cas.CertificateArgs
{
Cert = File.ReadAllText($"{path.Module}/test.crt"),
Key = File.ReadAllText($"{path.Module}/test.key"),
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
# Add a new Certificate.
cert = alicloud.cas.Certificate("cert",
cert=(lambda path: open(path).read())(f"{path['module']}/test.crt"),
key=(lambda path: open(path).read())(f"{path['module']}/test.key"))import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as fs from "fs";
// Add a new Certificate.
const cert = new alicloud.cas.Certificate("cert", {
cert: fs.readFileSync(`./test.crt`, "utf-8"),
key: fs.readFileSync(`./test.key`, "utf-8"),
});Create a Certificate Resource
new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);def Certificate(resource_name, opts=None, cert=None, key=None, name=None, __props__=None);func NewCertificate(ctx *Context, name string, args CertificateArgs, opts ...ResourceOption) (*Certificate, error)public Certificate(string name, CertificateArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Certificate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Certificate resource accepts the following input properties:
- Cert string
Cert of the Certificate in which the Certificate will add.
- Key string
Key of the Certificate in which the Certificate will add.
- Name string
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
- Cert string
Cert of the Certificate in which the Certificate will add.
- Key string
Key of the Certificate in which the Certificate will add.
- Name string
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
- cert string
Cert of the Certificate in which the Certificate will add.
- key string
Key of the Certificate in which the Certificate will add.
- name string
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
- cert str
Cert of the Certificate in which the Certificate will add.
- key str
Key of the Certificate in which the Certificate will add.
- name str
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
Outputs
All input properties are implicitly available as output properties. Additionally, the Certificate resource produces the following output properties:
Look up an 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): Certificatestatic get(resource_name, id, opts=None, cert=None, key=None, name=None, __props__=None);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)- 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.
The following state arguments are supported:
- Cert string
Cert of the Certificate in which the Certificate will add.
- Key string
Key of the Certificate in which the Certificate will add.
- Name string
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
- Cert string
Cert of the Certificate in which the Certificate will add.
- Key string
Key of the Certificate in which the Certificate will add.
- Name string
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
- cert string
Cert of the Certificate in which the Certificate will add.
- key string
Key of the Certificate in which the Certificate will add.
- name string
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
- cert str
Cert of the Certificate in which the Certificate will add.
- key str
Key of the Certificate in which the Certificate will add.
- name str
Name of the Certificate. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix
.shand.telare not supported.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.