alicloud logo
Alibaba Cloud v3.38.0, Jun 2 23

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

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()
    {
        CertificateContents = "your_certificate",
        CertificateName = "your_certificate_name",
        Domain = "your_domain_name",
        InstanceId = "your_instance_id",
        PrivateKey = "your_private_key",
    });

    var default2 = new AliCloud.Waf.Certificate("default2", new()
    {
        CertificateId = "your_certificate_id",
        Domain = "your_domain_name",
        InstanceId = "your_instance_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{
			Certificate:     pulumi.String("your_certificate"),
			CertificateName: pulumi.String("your_certificate_name"),
			Domain:          pulumi.String("your_domain_name"),
			InstanceId:      pulumi.String("your_instance_id"),
			PrivateKey:      pulumi.String("your_private_key"),
		})
		if err != nil {
			return err
		}
		_, err = waf.NewCertificate(ctx, "default2", &waf.CertificateArgs{
			CertificateId: pulumi.String("your_certificate_id"),
			Domain:        pulumi.String("your_domain_name"),
			InstanceId:    pulumi.String("your_instance_id"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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()        
            .certificate("your_certificate")
            .certificateName("your_certificate_name")
            .domain("your_domain_name")
            .instanceId("your_instance_id")
            .privateKey("your_private_key")
            .build());

        var default2 = new Certificate("default2", CertificateArgs.builder()        
            .certificateId("your_certificate_id")
            .domain("your_domain_name")
            .instanceId("your_instance_id")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.waf.Certificate("default",
    certificate="your_certificate",
    certificate_name="your_certificate_name",
    domain="your_domain_name",
    instance_id="your_instance_id",
    private_key="your_private_key")
default2 = alicloud.waf.Certificate("default2",
    certificate_id="your_certificate_id",
    domain="your_domain_name",
    instance_id="your_instance_id")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.waf.Certificate("default", {
    certificate: "your_certificate",
    certificateName: "your_certificate_name",
    domain: "your_domain_name",
    instanceId: "your_instance_id",
    privateKey: "your_private_key",
});
const default2 = new alicloud.waf.Certificate("default2", {
    certificateId: "your_certificate_id",
    domain: "your_domain_name",
    instanceId: "your_instance_id",
});
resources:
  default:
    type: alicloud:waf:Certificate
    properties:
      certificate: your_certificate
      certificateName: your_certificate_name
      domain: your_domain_name
      instanceId: your_instance_id
      privateKey: your_private_key
  default2:
    type: alicloud:waf:Certificate
    properties:
      certificateId: your_certificate_id
      domain: your_domain_name
      instanceId: your_instance_id

Create Certificate Resource

new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: 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)
@overload
def Certificate(resource_name: str,
                args: CertificateArgs,
                opts: Optional[ResourceOptions] = 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.

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.

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

The Certificate resource accepts the following input properties:

Domain string

The domain that you want to add to WAF.

InstanceId string

The ID of the WAF instance.

CertificateContents string

Certificate file content.

CertificateId string

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

CertificateName string

Certificate file name.

PrivateKey string

The private key.

Domain string

The domain that you want to add to WAF.

InstanceId string

The ID of the WAF instance.

Certificate string

Certificate file content.

CertificateId string

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

CertificateName string

Certificate file name.

PrivateKey string

The private key.

domain String

The domain that you want to add to WAF.

instanceId String

The ID of the WAF instance.

certificate String

Certificate file content.

certificateId String

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

certificateName String

Certificate file name.

privateKey String

The private key.

domain string

The domain that you want to add to WAF.

instanceId string

The ID of the WAF instance.

certificate string

Certificate file content.

certificateId string

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

certificateName string

Certificate file name.

privateKey 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.

instanceId String

The ID of the WAF instance.

certificate String

Certificate file content.

certificateId String

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

certificateName String

Certificate file name.

privateKey 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.
The following state arguments are supported:
CertificateContents string

Certificate file content.

CertificateId string

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

CertificateName string

Certificate file name.

Domain string

The domain that you want to add to WAF.

InstanceId string

The ID of the WAF instance.

PrivateKey string

The private key.

Certificate string

Certificate file content.

CertificateId string

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

CertificateName string

Certificate file name.

Domain string

The domain that you want to add to WAF.

InstanceId string

The ID of the WAF instance.

PrivateKey string

The private key.

certificate String

Certificate file content.

certificateId String

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

certificateName String

Certificate file name.

domain String

The domain that you want to add to WAF.

instanceId String

The ID of the WAF instance.

privateKey String

The private key.

certificate string

Certificate file content.

certificateId string

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

certificateName string

Certificate file name.

domain string

The domain that you want to add to WAF.

instanceId string

The ID of the WAF instance.

privateKey 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.

certificateId String

The certificate id is automatically generated when you upload your certificate content.NOTE: you can also use Certificate ID saved in SSL.

certificateName String

Certificate file name.

domain String

The domain that you want to add to WAF.

instanceId String

The ID of the WAF instance.

privateKey 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>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.