volcenginecc.alb.Certificate
ALB 支持上传服务器证书、CA 证书到控制台,对上传的证书单独管理。
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
const aLBCertificateDemo = new volcenginecc.alb.Certificate("ALBCertificateDemo", {
certificateName: "ALBCertificateDemo",
certificateType: "CA",
publicKey: "-----BEGIN CERTIFICATE-----xxxx-----END CERTIFICATE-----",
description: "ALBCertificateDemo description",
projectName: "default",
tags: [{
key: "env",
value: "test",
}],
});
import pulumi
import pulumi_volcenginecc as volcenginecc
a_lb_certificate_demo = volcenginecc.alb.Certificate("ALBCertificateDemo",
certificate_name="ALBCertificateDemo",
certificate_type="CA",
public_key="-----BEGIN CERTIFICATE-----xxxx-----END CERTIFICATE-----",
description="ALBCertificateDemo description",
project_name="default",
tags=[{
"key": "env",
"value": "test",
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/alb"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alb.NewCertificate(ctx, "ALBCertificateDemo", &alb.CertificateArgs{
CertificateName: pulumi.String("ALBCertificateDemo"),
CertificateType: pulumi.String("CA"),
PublicKey: pulumi.String("-----BEGIN CERTIFICATE-----xxxx-----END CERTIFICATE-----"),
Description: pulumi.String("ALBCertificateDemo description"),
ProjectName: pulumi.String("default"),
Tags: alb.CertificateTagArray{
&alb.CertificateTagArgs{
Key: pulumi.String("env"),
Value: pulumi.String("test"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
return await Deployment.RunAsync(() =>
{
var aLBCertificateDemo = new Volcenginecc.Alb.Certificate("ALBCertificateDemo", new()
{
CertificateName = "ALBCertificateDemo",
CertificateType = "CA",
PublicKey = "-----BEGIN CERTIFICATE-----xxxx-----END CERTIFICATE-----",
Description = "ALBCertificateDemo description",
ProjectName = "default",
Tags = new[]
{
new Volcenginecc.Alb.Inputs.CertificateTagArgs
{
Key = "env",
Value = "test",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.volcengine.volcenginecc.alb.Certificate;
import com.volcengine.volcenginecc.alb.CertificateArgs;
import com.pulumi.volcenginecc.alb.inputs.CertificateTagArgs;
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 aLBCertificateDemo = new Certificate("aLBCertificateDemo", CertificateArgs.builder()
.certificateName("ALBCertificateDemo")
.certificateType("CA")
.publicKey("-----BEGIN CERTIFICATE-----xxxx-----END CERTIFICATE-----")
.description("ALBCertificateDemo description")
.projectName("default")
.tags(CertificateTagArgs.builder()
.key("env")
.value("test")
.build())
.build());
}
}
resources:
aLBCertificateDemo:
type: volcenginecc:alb:Certificate
name: ALBCertificateDemo
properties:
certificateName: ALBCertificateDemo
certificateType: CA
publicKey: '-----BEGIN CERTIFICATE-----xxxx-----END CERTIFICATE-----'
description: ALBCertificateDemo description
projectName: default
tags:
- key: env
value: test
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: CertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Certificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
certificate_type: Optional[str] = None,
public_key: Optional[str] = None,
certificate_name: Optional[str] = None,
description: Optional[str] = None,
private_key: Optional[str] = None,
project_name: Optional[str] = None,
tags: Optional[Sequence[CertificateTagArgs]] = 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: volcenginecc:alb: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 certificateResource = new Volcenginecc.Alb.Certificate("certificateResource", new()
{
CertificateType = "string",
PublicKey = "string",
CertificateName = "string",
Description = "string",
PrivateKey = "string",
ProjectName = "string",
Tags = new[]
{
new Volcenginecc.Alb.Inputs.CertificateTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := alb.NewCertificate(ctx, "certificateResource", &alb.CertificateArgs{
CertificateType: pulumi.String("string"),
PublicKey: pulumi.String("string"),
CertificateName: pulumi.String("string"),
Description: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
ProjectName: pulumi.String("string"),
Tags: alb.CertificateTagArray{
&alb.CertificateTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
.certificateType("string")
.publicKey("string")
.certificateName("string")
.description("string")
.privateKey("string")
.projectName("string")
.tags(CertificateTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
certificate_resource = volcenginecc.alb.Certificate("certificateResource",
certificate_type="string",
public_key="string",
certificate_name="string",
description="string",
private_key="string",
project_name="string",
tags=[{
"key": "string",
"value": "string",
}])
const certificateResource = new volcenginecc.alb.Certificate("certificateResource", {
certificateType: "string",
publicKey: "string",
certificateName: "string",
description: "string",
privateKey: "string",
projectName: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: volcenginecc:alb:Certificate
properties:
certificateName: string
certificateType: string
description: string
privateKey: string
projectName: string
publicKey: string
tags:
- key: string
value: 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:
- Certificate
Type string - 证书类型,取值:CA:CA证书、Server:服务器证书。
- Public
Key string - 服务器证书的公钥。
- Certificate
Name string - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- Description string
- 证书描述。
- Private
Key string - 服务器证书的私钥,当证书类型为Server时必填。
- Project
Name string - 项目名称。
- List<Volcengine.
Certificate Tag>
- Certificate
Type string - 证书类型,取值:CA:CA证书、Server:服务器证书。
- Public
Key string - 服务器证书的公钥。
- Certificate
Name string - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- Description string
- 证书描述。
- Private
Key string - 服务器证书的私钥,当证书类型为Server时必填。
- Project
Name string - 项目名称。
- []Certificate
Tag Args
- certificate
Type String - 证书类型,取值:CA:CA证书、Server:服务器证书。
- public
Key String - 服务器证书的公钥。
- certificate
Name String - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- description String
- 证书描述。
- private
Key String - 服务器证书的私钥,当证书类型为Server时必填。
- project
Name String - 项目名称。
- List<Certificate
Tag>
- certificate
Type string - 证书类型,取值:CA:CA证书、Server:服务器证书。
- public
Key string - 服务器证书的公钥。
- certificate
Name string - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- description string
- 证书描述。
- private
Key string - 服务器证书的私钥,当证书类型为Server时必填。
- project
Name string - 项目名称。
- Certificate
Tag[]
- certificate_
type str - 证书类型,取值:CA:CA证书、Server:服务器证书。
- public_
key str - 服务器证书的公钥。
- certificate_
name str - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- description str
- 证书描述。
- private_
key str - 服务器证书的私钥,当证书类型为Server时必填。
- project_
name str - 项目名称。
- Sequence[Certificate
Tag Args]
- certificate
Type String - 证书类型,取值:CA:CA证书、Server:服务器证书。
- public
Key String - 服务器证书的公钥。
- certificate
Name String - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- description String
- 证书描述。
- private
Key String - 服务器证书的私钥,当证书类型为Server时必填。
- project
Name String - 项目名称。
- List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the Certificate resource produces the following output properties:
- Certificate
Id string - 证书ID。
- Created
Time string - 证书创建时间。
- Domain
Name string - 证书域名。
- Expired
At string - 证书过期时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Listeners List<string>
- 证书关联的监听器列表。
- San string
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- Status string
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- Certificate
Id string - 证书ID。
- Created
Time string - 证书创建时间。
- Domain
Name string - 证书域名。
- Expired
At string - 证书过期时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Listeners []string
- 证书关联的监听器列表。
- San string
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- Status string
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- certificate
Id String - 证书ID。
- created
Time String - 证书创建时间。
- domain
Name String - 证书域名。
- expired
At String - 证书过期时间。
- id String
- The provider-assigned unique ID for this managed resource.
- listeners List<String>
- 证书关联的监听器列表。
- san String
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status String
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- certificate
Id string - 证书ID。
- created
Time string - 证书创建时间。
- domain
Name string - 证书域名。
- expired
At string - 证书过期时间。
- id string
- The provider-assigned unique ID for this managed resource.
- listeners string[]
- 证书关联的监听器列表。
- san string
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status string
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- certificate_
id str - 证书ID。
- created_
time str - 证书创建时间。
- domain_
name str - 证书域名。
- expired_
at str - 证书过期时间。
- id str
- The provider-assigned unique ID for this managed resource.
- listeners Sequence[str]
- 证书关联的监听器列表。
- san str
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status str
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- certificate
Id String - 证书ID。
- created
Time String - 证书创建时间。
- domain
Name String - 证书域名。
- expired
At String - 证书过期时间。
- id String
- The provider-assigned unique ID for this managed resource.
- listeners List<String>
- 证书关联的监听器列表。
- san String
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status String
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
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,
certificate_id: Optional[str] = None,
certificate_name: Optional[str] = None,
certificate_type: Optional[str] = None,
created_time: Optional[str] = None,
description: Optional[str] = None,
domain_name: Optional[str] = None,
expired_at: Optional[str] = None,
listeners: Optional[Sequence[str]] = None,
private_key: Optional[str] = None,
project_name: Optional[str] = None,
public_key: Optional[str] = None,
san: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[CertificateTagArgs]] = 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)
resources: _: type: volcenginecc:alb:Certificate get: id: ${id}
- 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.
- Certificate
Id string - 证书ID。
- Certificate
Name string - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- Certificate
Type string - 证书类型,取值:CA:CA证书、Server:服务器证书。
- Created
Time string - 证书创建时间。
- Description string
- 证书描述。
- Domain
Name string - 证书域名。
- Expired
At string - 证书过期时间。
- Listeners List<string>
- 证书关联的监听器列表。
- Private
Key string - 服务器证书的私钥,当证书类型为Server时必填。
- Project
Name string - 项目名称。
- Public
Key string - 服务器证书的公钥。
- San string
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- Status string
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- List<Volcengine.
Certificate Tag>
- Certificate
Id string - 证书ID。
- Certificate
Name string - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- Certificate
Type string - 证书类型,取值:CA:CA证书、Server:服务器证书。
- Created
Time string - 证书创建时间。
- Description string
- 证书描述。
- Domain
Name string - 证书域名。
- Expired
At string - 证书过期时间。
- Listeners []string
- 证书关联的监听器列表。
- Private
Key string - 服务器证书的私钥,当证书类型为Server时必填。
- Project
Name string - 项目名称。
- Public
Key string - 服务器证书的公钥。
- San string
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- Status string
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- []Certificate
Tag Args
- certificate
Id String - 证书ID。
- certificate
Name String - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- certificate
Type String - 证书类型,取值:CA:CA证书、Server:服务器证书。
- created
Time String - 证书创建时间。
- description String
- 证书描述。
- domain
Name String - 证书域名。
- expired
At String - 证书过期时间。
- listeners List<String>
- 证书关联的监听器列表。
- private
Key String - 服务器证书的私钥,当证书类型为Server时必填。
- project
Name String - 项目名称。
- public
Key String - 服务器证书的公钥。
- san String
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status String
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- List<Certificate
Tag>
- certificate
Id string - 证书ID。
- certificate
Name string - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- certificate
Type string - 证书类型,取值:CA:CA证书、Server:服务器证书。
- created
Time string - 证书创建时间。
- description string
- 证书描述。
- domain
Name string - 证书域名。
- expired
At string - 证书过期时间。
- listeners string[]
- 证书关联的监听器列表。
- private
Key string - 服务器证书的私钥,当证书类型为Server时必填。
- project
Name string - 项目名称。
- public
Key string - 服务器证书的公钥。
- san string
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status string
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- Certificate
Tag[]
- certificate_
id str - 证书ID。
- certificate_
name str - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- certificate_
type str - 证书类型,取值:CA:CA证书、Server:服务器证书。
- created_
time str - 证书创建时间。
- description str
- 证书描述。
- domain_
name str - 证书域名。
- expired_
at str - 证书过期时间。
- listeners Sequence[str]
- 证书关联的监听器列表。
- private_
key str - 服务器证书的私钥,当证书类型为Server时必填。
- project_
name str - 项目名称。
- public_
key str - 服务器证书的公钥。
- san str
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status str
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- Sequence[Certificate
Tag Args]
- certificate
Id String - 证书ID。
- certificate
Name String - 证书名称,长度限制为1 ~ 128个字符,必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
- certificate
Type String - 证书类型,取值:CA:CA证书、Server:服务器证书。
- created
Time String - 证书创建时间。
- description String
- 证书描述。
- domain
Name String - 证书域名。
- expired
At String - 证书过期时间。
- listeners List<String>
- 证书关联的监听器列表。
- private
Key String - 服务器证书的私钥,当证书类型为Server时必填。
- project
Name String - 项目名称。
- public
Key String - 服务器证书的公钥。
- san String
- 证书扩展域名列表,用英文',' 分隔多个域名, 包含(commonName,DnsName,IP)。
- status String
- 证书的状态,取值为:Creating:创建中。Active:运行中。Deleting:删除中。
- List<Property Map>
Supporting Types
CertificateTag, CertificateTagArgs
Import
$ pulumi import volcenginecc:alb/certificate:Certificate example "certificate_id|certificate_type"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcenginecc
Terraform Provider.