@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
308 lines (307 loc) • 12.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages an ELB certificate resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const certificate1 = new huaweicloud.Elb.Certificate("certificate_1", {
* certificate: `-----BEGIN CERTIFICATE-----
* MIIDpTCCAo2gAwIBAgIJAKdmmOBYnFvoMA0GCSqGSIb3DQEBCwUAMGkxCzAJBgNV
* BAYTAnh4MQswCQYDVQQIDAJ4eDELMAkGA1UEBwwCeHgxCzAJBgNVBAoMAnh4MQsw
* CQYDVQQLDAJ4eDELMAkGA1UEAwwCeHgxGTAXBgkqhkiG9w0BCQEWCnh4QDE2My5j
* b20wHhcNMTcxMjA0MDM0MjQ5WhcNMjAxMjAzMDM0MjQ5WjBpMQswCQYDVQQGEwJ4
* eDELMAkGA1UECAwCeHgxCzAJBgNVBAcMAnh4MQswCQYDVQQKDAJ4eDELMAkGA1UE
* CwwCeHgxCzAJBgNVBAMMAnh4MRkwFwYJKoZIhvcNAQkBFgp4eEAxNjMuY29tMIIB
* IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwZ5UJULAjWr7p6FVwGRQRjFN
* 2s8tZ/6LC3X82fajpVsYqF1xqEuUDndDXVD09E4u83MS6HO6a3bIVQDp6/klnYld
* iE6Vp8HH5BSKaCWKVg8lGWg1UM9wZFnlryi14KgmpIFmcu9nA8yV/6MZAe6RSDmb
* 3iyNBmiZ8aZhGw2pI1YwR+15MVqFFGB+7ExkziROi7L8CFCyCezK2/oOOvQsH1dz
* Q8z1JXWdg8/9Zx7Ktvgwu5PQM3cJtSHX6iBPOkMU8Z8TugLlTqQXKZOEgwajwvQ5
* mf2DPkVgM08XAgaLJcLigwD513koAdtJd5v+9irw+5LAuO3JclqwTvwy7u/YwwID
* AQABo1AwTjAdBgNVHQ4EFgQUo5A2tIu+bcUfvGTD7wmEkhXKFjcwHwYDVR0jBBgw
* FoAUo5A2tIu+bcUfvGTD7wmEkhXKFjcwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B
* AQsFAAOCAQEAWJ2rS6Mvlqk3GfEpboezx2J3X7l1z8Sxoqg6ntwB+rezvK3mc9H0
* 83qcVeUcoH+0A0lSHyFN4FvRQL6X1hEheHarYwJK4agb231vb5erasuGO463eYEG
* r4SfTuOm7SyiV2xxbaBKrXJtpBp4WLL/s+LF+nklKjaOxkmxUX0sM4CTA7uFJypY
* c8Tdr8lDDNqoUtMD8BrUCJi+7lmMXRcC3Qi3oZJW76ja+kZA5mKVFPd1ATih8TbA
* i34R7EQDtFeiSvBdeKRsPp8c0KT8H1B4lXNkkCQs2WX5p4lm99+ZtLD4glw8x6Ic
* i1YhgnQbn5E0hz55OLu5jvOkKQjPCW+8Kg==
* -----END CERTIFICATE-----
* `,
* description: "terraform test certificate",
* domain: "www.elb.com",
* privateKey: `-----BEGIN RSA PRIVATE KEY-----
* MIIEowIBAAKCAQEAwZ5UJULAjWr7p6FVwGRQRjFN2s8tZ/6LC3X82fajpVsYqF1x
* qEuUDndDXVD09E4u83MS6HO6a3bIVQDp6/klnYldiE6Vp8HH5BSKaCWKVg8lGWg1
* UM9wZFnlryi14KgmpIFmcu9nA8yV/6MZAe6RSDmb3iyNBmiZ8aZhGw2pI1YwR+15
* MVqFFGB+7ExkziROi7L8CFCyCezK2/oOOvQsH1dzQ8z1JXWdg8/9Zx7Ktvgwu5PQ
* M3cJtSHX6iBPOkMU8Z8TugLlTqQXKZOEgwajwvQ5mf2DPkVgM08XAgaLJcLigwD5
* 13koAdtJd5v+9irw+5LAuO3JclqwTvwy7u/YwwIDAQABAoIBACU9S5fjD9/jTMXA
* DRs08A+gGgZUxLn0xk+NAPX3LyB1tfdkCaFB8BccLzO6h3KZuwQOBPv6jkdvEDbx
* Nwyw3eA/9GJsIvKiHc0rej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u85vl8NpCXwe/LoVoIn+7KaVIZMwqoGMfgNl
* nEqm7HWkNxHhf8A6En/IjleuddS1sf9e/x+TJN1Xhnt9W6pe7Fk1
* -----END RSA PRIVATE KEY-----
* `,
* });
* ```
*
* ## Import
*
* ELB certificate can be imported using the `id` e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Elb/certificate:Certificate test <id>
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`enterprise_project_id`. It is generally recommended running `terraform plan` after importing a certificate. You can then decide if changes should be applied to the certificate, or the resource definition should be updated to align with the certificate. Also you can ignore changes as below. hcl resource "huaweicloud_lb_certificate" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* enterprise_project_id, private_key,
*
* ]
*
* } }
*/
export declare class Certificate extends pulumi.CustomResource {
/**
* Get an existing Certificate resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CertificateState, opts?: pulumi.CustomResourceOptions): 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.
*/
static isInstance(obj: any): obj is Certificate;
/**
* The public encrypted key of the Certificate, PEM format.
*/
readonly certificate: pulumi.Output<string>;
/**
* Indicates the creation time.
*/
readonly createTime: pulumi.Output<string>;
/**
* Human-readable description for the Certificate.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The domain of the Certificate. The value contains a maximum of 100 characters. This
* parameter is valid only when `type` is set to **server**.
*/
readonly domain: pulumi.Output<string | undefined>;
/**
* The enterprise project ID of the certificate. Changing this
* creates a new certificate.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Indicates the expire time.
*/
readonly expireTime: pulumi.Output<string>;
/**
* Human-readable name for the Certificate. Does not have to be unique.
*/
readonly name: pulumi.Output<string>;
/**
* The private encrypted key of the Certificate, PEM format. This parameter is valid
* and mandatory only when `type` is set to **server**.
*/
readonly privateKey: pulumi.Output<string | undefined>;
/**
* Specifies why the modification protection is enabled.
*/
readonly protectionReason: pulumi.Output<string | undefined>;
/**
* Specifies the protection status. Value options:
* + **nonProtection**: The load balancer is not protected.
* + **consoleProtection**: Modification protection is enabled to avoid that resources are modified by accident on the console.
*/
readonly protectionStatus: pulumi.Output<string>;
/**
* The region in which to create the ELB certificate resource. If omitted, the
* provider-level region will be used. Changing this creates a new certificate.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the source of the certificate.
*/
readonly source: pulumi.Output<string>;
/**
* Specifies the certificate type. The default value is "server". The value can be
* one of the following:
* + **server**: indicates the server certificate.
* + **client**: indicates the CA certificate.
*/
readonly type: pulumi.Output<string>;
/**
* Indicates the update time.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a Certificate resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: CertificateArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Certificate resources.
*/
export interface CertificateState {
/**
* The public encrypted key of the Certificate, PEM format.
*/
certificate?: pulumi.Input<string>;
/**
* Indicates the creation time.
*/
createTime?: pulumi.Input<string>;
/**
* Human-readable description for the Certificate.
*/
description?: pulumi.Input<string>;
/**
* The domain of the Certificate. The value contains a maximum of 100 characters. This
* parameter is valid only when `type` is set to **server**.
*/
domain?: pulumi.Input<string>;
/**
* The enterprise project ID of the certificate. Changing this
* creates a new certificate.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Indicates the expire time.
*/
expireTime?: pulumi.Input<string>;
/**
* Human-readable name for the Certificate. Does not have to be unique.
*/
name?: pulumi.Input<string>;
/**
* The private encrypted key of the Certificate, PEM format. This parameter is valid
* and mandatory only when `type` is set to **server**.
*/
privateKey?: pulumi.Input<string>;
/**
* Specifies why the modification protection is enabled.
*/
protectionReason?: pulumi.Input<string>;
/**
* Specifies the protection status. Value options:
* + **nonProtection**: The load balancer is not protected.
* + **consoleProtection**: Modification protection is enabled to avoid that resources are modified by accident on the console.
*/
protectionStatus?: pulumi.Input<string>;
/**
* The region in which to create the ELB certificate resource. If omitted, the
* provider-level region will be used. Changing this creates a new certificate.
*/
region?: pulumi.Input<string>;
/**
* Specifies the source of the certificate.
*/
source?: pulumi.Input<string>;
/**
* Specifies the certificate type. The default value is "server". The value can be
* one of the following:
* + **server**: indicates the server certificate.
* + **client**: indicates the CA certificate.
*/
type?: pulumi.Input<string>;
/**
* Indicates the update time.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Certificate resource.
*/
export interface CertificateArgs {
/**
* The public encrypted key of the Certificate, PEM format.
*/
certificate: pulumi.Input<string>;
/**
* Human-readable description for the Certificate.
*/
description?: pulumi.Input<string>;
/**
* The domain of the Certificate. The value contains a maximum of 100 characters. This
* parameter is valid only when `type` is set to **server**.
*/
domain?: pulumi.Input<string>;
/**
* The enterprise project ID of the certificate. Changing this
* creates a new certificate.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Human-readable name for the Certificate. Does not have to be unique.
*/
name?: pulumi.Input<string>;
/**
* The private encrypted key of the Certificate, PEM format. This parameter is valid
* and mandatory only when `type` is set to **server**.
*/
privateKey?: pulumi.Input<string>;
/**
* Specifies why the modification protection is enabled.
*/
protectionReason?: pulumi.Input<string>;
/**
* Specifies the protection status. Value options:
* + **nonProtection**: The load balancer is not protected.
* + **consoleProtection**: Modification protection is enabled to avoid that resources are modified by accident on the console.
*/
protectionStatus?: pulumi.Input<string>;
/**
* The region in which to create the ELB certificate resource. If omitted, the
* provider-level region will be used. Changing this creates a new certificate.
*/
region?: pulumi.Input<string>;
/**
* Specifies the source of the certificate.
*/
source?: pulumi.Input<string>;
/**
* Specifies the certificate type. The default value is "server". The value can be
* one of the following:
* + **server**: indicates the server certificate.
* + **client**: indicates the CA certificate.
*/
type?: pulumi.Input<string>;
}