Module cas

This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-alicloud repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-alicloud repo.

Resources

Functions

Others

Resources

Resource Certificate

class Certificate extends CustomResource

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

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"),
});

constructor

new Certificate(name: string, args: CertificateArgs, opts?: pulumi.CustomResourceOptions)

Create a Certificate resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CertificateState, opts?: pulumi.CustomResourceOptions): Certificate

Get an existing Certificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Certificate

Returns true if the given object is an instance of Certificate. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property cert

public cert: pulumi.Output<string>;

Cert of the Certificate in which the Certificate will add.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property key

public key: pulumi.Output<string>;

Key of the Certificate in which the Certificate will add.

property name

public name: pulumi.Output<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 .sh and .tel are not supported.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Functions

Function getCertificates

getCertificates(args?: GetCertificatesArgs, opts?: pulumi.InvokeOptions): Promise<GetCertificatesResult>

This data source provides a list of CAS Certificates in an Alibaba Cloud account according to the specified filters.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const certs = pulumi.output(alicloud.cas.getCertificates({
    nameRegex: "^cas",
    outputFile: `./cas_certificates.json`,
}, { async: true }));

export const cert = certs.certificates[0].id;

Others

interface CertificateArgs

interface CertificateArgs

The set of arguments for constructing a Certificate resource.

property cert

cert: pulumi.Input<string>;

Cert of the Certificate in which the Certificate will add.

property key

key: pulumi.Input<string>;

Key of the Certificate in which the Certificate will add.

property name

name?: pulumi.Input<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 .sh and .tel are not supported.

interface CertificateState

interface CertificateState

Input properties used for looking up and filtering Certificate resources.

property cert

cert?: pulumi.Input<string>;

Cert of the Certificate in which the Certificate will add.

property key

key?: pulumi.Input<string>;

Key of the Certificate in which the Certificate will add.

property name

name?: pulumi.Input<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 .sh and .tel are not supported.

interface GetCertificatesArgs

interface GetCertificatesArgs

A collection of arguments for invoking getCertificates.

property ids

ids?: string[];

A list of cert IDs.

property nameRegex

nameRegex?: undefined | string;

A regex string to filter results by the certificate name.

property outputFile

outputFile?: undefined | string;

interface GetCertificatesResult

interface GetCertificatesResult

A collection of values returned by getCertificates.

property certificates

certificates: GetCertificatesCertificate[];

A list of apis. Each element contains the following attributes:

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of cert IDs.

property nameRegex

nameRegex?: undefined | string;

property names

names: string[];

A list of cert names.

property outputFile

outputFile?: undefined | string;