alicloud.waf.Certificate
Explore with Pulumi AI
Provides a WAF Certificate resource.
For information about WAF Certificate and how to use it, see What is Certificate.
NOTE: Available in v1.135.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.waf.Certificate("default", {
certificateName: "your_certificate_name",
instanceId: "your_instance_id",
domain: "your_domain_name",
privateKey: "your_private_key",
certificate: "your_certificate",
});
const default2 = new alicloud.waf.Certificate("default2", {
instanceId: "your_instance_id",
domain: "your_domain_name",
certificateId: "your_certificate_id",
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.waf.Certificate("default",
certificate_name="your_certificate_name",
instance_id="your_instance_id",
domain="your_domain_name",
private_key="your_private_key",
certificate="your_certificate")
default2 = alicloud.waf.Certificate("default2",
instance_id="your_instance_id",
domain="your_domain_name",
certificate_id="your_certificate_id")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/waf"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := waf.NewCertificate(ctx, "default", &waf.CertificateArgs{
CertificateName: pulumi.String("your_certificate_name"),
InstanceId: pulumi.String("your_instance_id"),
Domain: pulumi.String("your_domain_name"),
PrivateKey: pulumi.String("your_private_key"),
Certificate: pulumi.String("your_certificate"),
})
if err != nil {
return err
}
_, err = waf.NewCertificate(ctx, "default2", &waf.CertificateArgs{
InstanceId: pulumi.String("your_instance_id"),
Domain: pulumi.String("your_domain_name"),
CertificateId: pulumi.String("your_certificate_id"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Waf.Certificate("default", new()
{
CertificateName = "your_certificate_name",
InstanceId = "your_instance_id",
Domain = "your_domain_name",
PrivateKey = "your_private_key",
CertificateContents = "your_certificate",
});
var default2 = new AliCloud.Waf.Certificate("default2", new()
{
InstanceId = "your_instance_id",
Domain = "your_domain_name",
CertificateId = "your_certificate_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.waf.Certificate;
import com.pulumi.alicloud.waf.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 default_ = new Certificate("default", CertificateArgs.builder()
.certificateName("your_certificate_name")
.instanceId("your_instance_id")
.domain("your_domain_name")
.privateKey("your_private_key")
.certificate("your_certificate")
.build());
var default2 = new Certificate("default2", CertificateArgs.builder()
.instanceId("your_instance_id")
.domain("your_domain_name")
.certificateId("your_certificate_id")
.build());
}
}
resources:
default:
type: alicloud:waf:Certificate
properties:
certificateName: your_certificate_name
instanceId: your_instance_id
domain: your_domain_name
privateKey: your_private_key
certificate: your_certificate
default2:
type: alicloud:waf:Certificate
properties:
instanceId: your_instance_id
domain: your_domain_name
certificateId: your_certificate_id
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,
domain: Optional[str] = None,
instance_id: Optional[str] = None,
certificate: Optional[str] = None,
certificate_id: Optional[str] = None,
certificate_name: Optional[str] = None,
private_key: Optional[str] = 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: alicloud:waf:Certificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. CertificateArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. CertificateArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. CertificateArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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 alicloudCertificateResource = new AliCloud.Waf.Certificate("alicloudCertificateResource", new()
{
Domain = "string",
InstanceId = "string",
CertificateContents = "string",
CertificateId = "string",
CertificateName = "string",
PrivateKey = "string",
});
example, err := waf.NewCertificate(ctx, "alicloudCertificateResource", &waf.CertificateArgs{
Domain: pulumi.String("string"),
InstanceId: pulumi.String("string"),
Certificate: pulumi.String("string"),
CertificateId: pulumi.String("string"),
CertificateName: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
})
var alicloudCertificateResource = new Certificate("alicloudCertificateResource", CertificateArgs.builder()
.domain("string")
.instanceId("string")
.certificate("string")
.certificateId("string")
.certificateName("string")
.privateKey("string")
.build());
alicloud_certificate_resource = alicloud.waf.Certificate("alicloudCertificateResource",
domain="string",
instance_id="string",
certificate="string",
certificate_id="string",
certificate_name="string",
private_key="string")
const alicloudCertificateResource = new alicloud.waf.Certificate("alicloudCertificateResource", {
domain: "string",
instanceId: "string",
certificate: "string",
certificateId: "string",
certificateName: "string",
privateKey: "string",
});
type: alicloud:waf:Certificate
properties:
certificate: string
certificateId: string
certificateName: string
domain: string
instanceId: string
privateKey: 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
This property is required. Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- Instance
Id This property is required. Changes to this property will trigger replacement.
- The ID of the WAF instance.
- Certificate
Contents Changes to this property will trigger replacement.
- Certificate file content.
- Certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- Private
Key Changes to this property will trigger replacement.
- The private key.
- Domain
This property is required. Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- Instance
Id This property is required. Changes to this property will trigger replacement.
- The ID of the WAF instance.
- Certificate
Changes to this property will trigger replacement.
- Certificate file content.
- Certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- Private
Key Changes to this property will trigger replacement.
- The private key.
- domain
This property is required. Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance
Id This property is required. Changes to this property will trigger replacement.
- The ID of the WAF instance.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- private
Key Changes to this property will trigger replacement.
- The private key.
- domain
This property is required. Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance
Id This property is required. Changes to this property will trigger replacement.
- The ID of the WAF instance.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- private
Key Changes to this property will trigger replacement.
- The private key.
- domain
This property is required. Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance_
id This property is required. Changes to this property will trigger replacement.
- The ID of the WAF instance.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate_
id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate_
name Changes to this property will trigger replacement.
- Certificate file name.
- private_
key Changes to this property will trigger replacement.
- The private key.
- domain
This property is required. Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance
Id This property is required. Changes to this property will trigger replacement.
- The ID of the WAF instance.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- private
Key Changes to this property will trigger replacement.
- The private key.
Outputs
All input properties are implicitly available as output properties. Additionally, the Certificate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
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: Optional[str] = None,
certificate_id: Optional[str] = None,
certificate_name: Optional[str] = None,
domain: Optional[str] = None,
instance_id: Optional[str] = None,
private_key: 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)
resources: _: type: alicloud:waf:Certificate get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
Contents Changes to this property will trigger replacement.
- Certificate file content.
- Certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- Domain
Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- Instance
Id Changes to this property will trigger replacement.
- The ID of the WAF instance.
- Private
Key Changes to this property will trigger replacement.
- The private key.
- Certificate
Changes to this property will trigger replacement.
- Certificate file content.
- Certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- Domain
Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- Instance
Id Changes to this property will trigger replacement.
- The ID of the WAF instance.
- Private
Key Changes to this property will trigger replacement.
- The private key.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- domain
Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance
Id Changes to this property will trigger replacement.
- The ID of the WAF instance.
- private
Key Changes to this property will trigger replacement.
- The private key.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- domain
Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance
Id Changes to this property will trigger replacement.
- The ID of the WAF instance.
- private
Key Changes to this property will trigger replacement.
- The private key.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate_
id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate_
name Changes to this property will trigger replacement.
- Certificate file name.
- domain
Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance_
id Changes to this property will trigger replacement.
- The ID of the WAF instance.
- private_
key Changes to this property will trigger replacement.
- The private key.
- certificate
Changes to this property will trigger replacement.
- Certificate file content.
- certificate
Id Changes to this property will trigger replacement.
- The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name Changes to this property will trigger replacement.
- Certificate file name.
- domain
Changes to this property will trigger replacement.
- The domain that you want to add to WAF.
- instance
Id Changes to this property will trigger replacement.
- The ID of the WAF instance.
- private
Key Changes to this property will trigger replacement.
- The private key.
Import
WAF Certificate can be imported using the id, e.g.
$ pulumi import alicloud:waf/certificate:Certificate example <instance_id>:<domain>:<certificate_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.