UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

201 lines (200 loc) 8.73 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages an IoTDA device CA certificate within HuaweiCloud. * * > When accessing an IoTDA **standard** or **enterprise** edition instance, you need to specify the IoTDA service * endpoint in `provider` block. * You can login to the IoTDA console, choose the instance **Overview** and click **Access Details** * to view the HTTPS application access address. An example of the access address might be * **9bc34xxxxx.st1.iotda-app.ap-southeast-1.myhuaweicloud.com**, then you need to configure the * `provider` block as follows: * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const certificateContent = config.requireObject("certificateContent"); * const test = new huaweicloud.iotda.DeviceCertificate("test", {content: certificateContent}); * ``` * * ## Import * * Device CA certificates can be imported by `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:IoTDA/deviceCertificate:DeviceCertificate test 62b3cec5558d4b703f064534 * ``` * * 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`content`, `space_id`, `verify_content`. It is generally recommended running `terraform plan` after importing the resource. You can then decide if changes should be applied to the resource, or the resource definition should be updated to align with the group. Also you can ignore changes as below. hcl resource "huaweicloud_iotda_device_certificate" "test" { * * ... * * lifecycle { * * ignore_changes = [ * * content, space_id, verify_content * * ] * * } } */ export declare class DeviceCertificate extends pulumi.CustomResource { /** * Get an existing DeviceCertificate 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?: DeviceCertificateState, opts?: pulumi.CustomResourceOptions): DeviceCertificate; /** * Returns true if the given object is an instance of DeviceCertificate. 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 DeviceCertificate; /** * The CN name of the device CA certificate. */ readonly cn: pulumi.Output<string>; /** * Specifies the content of device CA certificate. * Changing this parameter will create a new resource. Create a private CA certificate, * please following [reference](https://support.huaweicloud.com/usermanual-iothub/iot_01_0104.html) */ readonly content: pulumi.Output<string>; /** * The effective date of the device CA certificate. * The format is: **yyyyMMdd'T'HHmmss'Z'**, e.g., **20151212T121212Z**. */ readonly effectiveDate: pulumi.Output<string>; /** * The expiry date of the device CA certificate. * The format is: **yyyyMMdd'T'HHmmss'Z'**, e.g., **20151212T121212Z**. */ readonly expiryDate: pulumi.Output<string>; /** * The owner of the device CA certificate. */ readonly owner: pulumi.Output<string>; /** * Specifies the region in which to create the IoTDA device CA certificate * resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource. */ readonly region: pulumi.Output<string>; /** * Specifies the resource space ID to which the device CA certificate belongs. * If omitted, the certificate will belong to the default resource space. * Changing this parameter will create a new resource. */ readonly spaceId: pulumi.Output<string | undefined>; /** * The status of the device CA certificate. The valid values are **Unverified** and **Verified**. */ readonly status: pulumi.Output<string>; /** * The verify code of the device CA certificate. */ readonly verifyCode: pulumi.Output<string>; /** * Specifies the content of verification certificate. Can only be used to verify * the validity of the device CA certificate after creation. Get the verification certificate, * please following [reference](https://support.huaweicloud.com/usermanual-iothub/iot_01_0106.html) */ readonly verifyContent: pulumi.Output<string | undefined>; /** * Create a DeviceCertificate 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: DeviceCertificateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DeviceCertificate resources. */ export interface DeviceCertificateState { /** * The CN name of the device CA certificate. */ cn?: pulumi.Input<string>; /** * Specifies the content of device CA certificate. * Changing this parameter will create a new resource. Create a private CA certificate, * please following [reference](https://support.huaweicloud.com/usermanual-iothub/iot_01_0104.html) */ content?: pulumi.Input<string>; /** * The effective date of the device CA certificate. * The format is: **yyyyMMdd'T'HHmmss'Z'**, e.g., **20151212T121212Z**. */ effectiveDate?: pulumi.Input<string>; /** * The expiry date of the device CA certificate. * The format is: **yyyyMMdd'T'HHmmss'Z'**, e.g., **20151212T121212Z**. */ expiryDate?: pulumi.Input<string>; /** * The owner of the device CA certificate. */ owner?: pulumi.Input<string>; /** * Specifies the region in which to create the IoTDA device CA certificate * resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies the resource space ID to which the device CA certificate belongs. * If omitted, the certificate will belong to the default resource space. * Changing this parameter will create a new resource. */ spaceId?: pulumi.Input<string>; /** * The status of the device CA certificate. The valid values are **Unverified** and **Verified**. */ status?: pulumi.Input<string>; /** * The verify code of the device CA certificate. */ verifyCode?: pulumi.Input<string>; /** * Specifies the content of verification certificate. Can only be used to verify * the validity of the device CA certificate after creation. Get the verification certificate, * please following [reference](https://support.huaweicloud.com/usermanual-iothub/iot_01_0106.html) */ verifyContent?: pulumi.Input<string>; } /** * The set of arguments for constructing a DeviceCertificate resource. */ export interface DeviceCertificateArgs { /** * Specifies the content of device CA certificate. * Changing this parameter will create a new resource. Create a private CA certificate, * please following [reference](https://support.huaweicloud.com/usermanual-iothub/iot_01_0104.html) */ content: pulumi.Input<string>; /** * Specifies the region in which to create the IoTDA device CA certificate * resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies the resource space ID to which the device CA certificate belongs. * If omitted, the certificate will belong to the default resource space. * Changing this parameter will create a new resource. */ spaceId?: pulumi.Input<string>; /** * Specifies the content of verification certificate. Can only be used to verify * the validity of the device CA certificate after creation. Get the verification certificate, * please following [reference](https://support.huaweicloud.com/usermanual-iothub/iot_01_0106.html) */ verifyContent?: pulumi.Input<string>; }