@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
217 lines (216 loc) • 9.02 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages an IoTDA device group resource 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 name = config.requireObject("name");
* const spaceId = config.requireObject("spaceId");
* const deviceId = config.requireObject("deviceId");
* const test = new huaweicloud.iotda.DeviceGroup("test", {
* spaceId: spaceId,
* deviceIds: [deviceId],
* });
* ```
*
* ## Import
*
* The device group can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:IoTDA/deviceGroup:DeviceGroup 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`space_id`. 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_group" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* space_id,
*
* ]
*
* } }
*/
export declare class DeviceGroup extends pulumi.CustomResource {
/**
* Get an existing DeviceGroup 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?: DeviceGroupState, opts?: pulumi.CustomResourceOptions): DeviceGroup;
/**
* Returns true if the given object is an instance of DeviceGroup. 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 DeviceGroup;
/**
* Specifies the description of device group.
* The description contains a maximum of `64` characters. Only letters, Chinese characters, digits, hyphens (-),
* underscores (_) and the following special characters are allowed: `?'#().,&%@!`.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the list of device IDs bound to the group.
*/
readonly deviceIds: pulumi.Output<string[]>;
/**
* Specifies the dynamic device group rule, just fill in the content
* of the **where** clause, the remaining clauses do not need to be filled in.
* e.g. **device_name = 'xxx' or deviceName = 'xxx'**.
* More grammar rules, please see [API docs](https://support.huaweicloud.com/intl/en-us/api-iothub/SearchDevices.html).
*/
readonly dynamicGroupRule: pulumi.Output<string>;
/**
* Specifies the name of device group. The name contains a maximum of `64` characters.
* Only letters, digits, hyphens (-) and underscores (_) are allowed.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the parent group id.
* Changing this parameter will create a new resource.
*/
readonly parentGroupId: pulumi.Output<string>;
/**
* Specifies the region in which to create the IoTDA device group 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 group belongs.
* Changing this parameter will create a new resource.
*/
readonly spaceId: pulumi.Output<string>;
/**
* Specifies the device group type.
* The valid values are as follows:
* + **STATIC**: Static device group.
* + **DYNAMIC**: Dynamic device group.
*/
readonly type: pulumi.Output<string>;
/**
* Create a DeviceGroup 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: DeviceGroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DeviceGroup resources.
*/
export interface DeviceGroupState {
/**
* Specifies the description of device group.
* The description contains a maximum of `64` characters. Only letters, Chinese characters, digits, hyphens (-),
* underscores (_) and the following special characters are allowed: `?'#().,&%@!`.
*/
description?: pulumi.Input<string>;
/**
* Specifies the list of device IDs bound to the group.
*/
deviceIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the dynamic device group rule, just fill in the content
* of the **where** clause, the remaining clauses do not need to be filled in.
* e.g. **device_name = 'xxx' or deviceName = 'xxx'**.
* More grammar rules, please see [API docs](https://support.huaweicloud.com/intl/en-us/api-iothub/SearchDevices.html).
*/
dynamicGroupRule?: pulumi.Input<string>;
/**
* Specifies the name of device group. The name contains a maximum of `64` characters.
* Only letters, digits, hyphens (-) and underscores (_) are allowed.
*/
name?: pulumi.Input<string>;
/**
* Specifies the parent group id.
* Changing this parameter will create a new resource.
*/
parentGroupId?: pulumi.Input<string>;
/**
* Specifies the region in which to create the IoTDA device group 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 group belongs.
* Changing this parameter will create a new resource.
*/
spaceId?: pulumi.Input<string>;
/**
* Specifies the device group type.
* The valid values are as follows:
* + **STATIC**: Static device group.
* + **DYNAMIC**: Dynamic device group.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a DeviceGroup resource.
*/
export interface DeviceGroupArgs {
/**
* Specifies the description of device group.
* The description contains a maximum of `64` characters. Only letters, Chinese characters, digits, hyphens (-),
* underscores (_) and the following special characters are allowed: `?'#().,&%@!`.
*/
description?: pulumi.Input<string>;
/**
* Specifies the list of device IDs bound to the group.
*/
deviceIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the dynamic device group rule, just fill in the content
* of the **where** clause, the remaining clauses do not need to be filled in.
* e.g. **device_name = 'xxx' or deviceName = 'xxx'**.
* More grammar rules, please see [API docs](https://support.huaweicloud.com/intl/en-us/api-iothub/SearchDevices.html).
*/
dynamicGroupRule?: pulumi.Input<string>;
/**
* Specifies the name of device group. The name contains a maximum of `64` characters.
* Only letters, digits, hyphens (-) and underscores (_) are allowed.
*/
name?: pulumi.Input<string>;
/**
* Specifies the parent group id.
* Changing this parameter will create a new resource.
*/
parentGroupId?: pulumi.Input<string>;
/**
* Specifies the region in which to create the IoTDA device group 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 group belongs.
* Changing this parameter will create a new resource.
*/
spaceId: pulumi.Input<string>;
/**
* Specifies the device group type.
* The valid values are as follows:
* + **STATIC**: Static device group.
* + **DYNAMIC**: Dynamic device group.
*/
type?: pulumi.Input<string>;
}