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 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 AliCloud.Waf.Certificate("certificateResource", new()
{
Domain = "string",
InstanceId = "string",
CertificateContents = "string",
CertificateId = "string",
CertificateName = "string",
PrivateKey = "string",
});
example, err := waf.NewCertificate(ctx, "certificateResource", &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 certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
.domain("string")
.instanceId("string")
.certificate("string")
.certificateId("string")
.certificateName("string")
.privateKey("string")
.build());
certificate_resource = alicloud.waf.Certificate("certificateResource",
domain="string",
instance_id="string",
certificate="string",
certificate_id="string",
certificate_name="string",
private_key="string")
const certificateResource = new alicloud.waf.Certificate("certificateResource", {
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 string
- The domain that you want to add to WAF.
- Instance
Id string - The ID of the WAF instance.
- Certificate
Contents string - Certificate file content.
- Certificate
Id string - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name string - Certificate file name.
- Private
Key string - The private key.
- Domain string
- The domain that you want to add to WAF.
- Instance
Id string - The ID of the WAF instance.
- Certificate string
- Certificate file content.
- Certificate
Id string - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name string - Certificate file name.
- Private
Key string - The private key.
- domain String
- The domain that you want to add to WAF.
- instance
Id String - The ID of the WAF instance.
- certificate String
- Certificate file content.
- certificate
Id String - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name String - Certificate file name.
- private
Key String - The private key.
- domain string
- The domain that you want to add to WAF.
- instance
Id string - The ID of the WAF instance.
- certificate string
- Certificate file content.
- certificate
Id string - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name string - Certificate file name.
- private
Key string - The private key.
- domain str
- The domain that you want to add to WAF.
- instance_
id str - The ID of the WAF instance.
- certificate str
- Certificate file content.
- certificate_
id str - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate_
name str - Certificate file name.
- private_
key str - The private key.
- domain String
- The domain that you want to add to WAF.
- instance
Id String - The ID of the WAF instance.
- certificate String
- Certificate file content.
- certificate
Id String - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name String - Certificate file name.
- private
Key String - 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)
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.
- Certificate
Contents string - Certificate file content.
- Certificate
Id string - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name string - Certificate file name.
- Domain string
- The domain that you want to add to WAF.
- Instance
Id string - The ID of the WAF instance.
- Private
Key string - The private key.
- Certificate string
- Certificate file content.
- Certificate
Id string - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- Certificate
Name string - Certificate file name.
- Domain string
- The domain that you want to add to WAF.
- Instance
Id string - The ID of the WAF instance.
- Private
Key string - The private key.
- certificate String
- Certificate file content.
- certificate
Id String - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name String - Certificate file name.
- domain String
- The domain that you want to add to WAF.
- instance
Id String - The ID of the WAF instance.
- private
Key String - The private key.
- certificate string
- Certificate file content.
- certificate
Id string - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name string - Certificate file name.
- domain string
- The domain that you want to add to WAF.
- instance
Id string - The ID of the WAF instance.
- private
Key string - The private key.
- certificate str
- Certificate file content.
- certificate_
id str - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate_
name str - Certificate file name.
- domain str
- The domain that you want to add to WAF.
- instance_
id str - The ID of the WAF instance.
- private_
key str - The private key.
- certificate String
- Certificate file content.
- certificate
Id String - The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.
- certificate
Name String - Certificate file name.
- domain String
- The domain that you want to add to WAF.
- instance
Id String - The ID of the WAF instance.
- private
Key String - 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.