@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
263 lines (262 loc) • 10.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages ModelArts dataset version resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const datasetId = config.requireObject("datasetId");
* const v001 = new huaweicloud.modelarts.DatasetVersion("v001", {
* datasetId: datasetId,
* description: "Created by demo",
* });
* ```
*
* ## Import
*
* The dataset versions can be imported by dataset ID and version ID, separated by a slash, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:ModelArts/datasetVersion:DatasetVersion test yiROKoTTjtwjvP71yLG/wieeeoTrtrtjvn67yLm
* ```
*
* 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`hard_example`. It is generally recommended running `terraform plan` after importing a dataset. You can then decide if changes should be applied to the dataset, or the resource definition should be updated to align with the dataset. Also you can ignore changes as below. hcl resource "huaweicloud_modelarts_dataset_version" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* hard_example,
*
* ]
*
* } }
*/
export declare class DatasetVersion extends pulumi.CustomResource {
/**
* Get an existing DatasetVersion 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?: DatasetVersionState, opts?: pulumi.CustomResourceOptions): DatasetVersion;
/**
* Returns true if the given object is an instance of DatasetVersion. 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 DatasetVersion;
/**
* The creation time, in UTC format.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Specifies the ID of dataset.
* Changing this parameter will create a new resource.
*/
readonly datasetId: pulumi.Output<string>;
/**
* Specifies the description of dataset version. It contains a maximum of
* `256` characters and cannot contain special characters `!<>=&"'`. Changing this parameter will create a new resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The total number of samples.
*/
readonly files: pulumi.Output<number>;
/**
* Specifies whether to enable ModelArts to write the hard example
* attributes (difficult, hard-coefficient, and hard-reasons) into the XML and manifest labeling files. ModelArts will
* use these attributes to optimize hard example filtering. Default value is `false`.
* Changing this parameter will create a new resource.
*/
readonly hardExample: pulumi.Output<boolean | undefined>;
/**
* Whether this version is current version.
*/
readonly isCurrent: pulumi.Output<boolean>;
/**
* The label type of the dataset version. Valid values are as follows:
* + **multi**: Indicates that there are multi-label samples.
* + **single**: Indicates that all samples are single-label.
* + **unlabeled**: Indicates that all samples are unlabeled.
*/
readonly labelingType: pulumi.Output<string>;
/**
* Specifies the name of the dataset version. The name consists of `1` to `32`
* characters. Only letters, Chinese characters, digits underscores (_) and hyphens (-) are allowed.
* Changing this parameter will create a new resource.
*/
readonly name: pulumi.Output<string>;
/**
* The region in which to create the 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 ratio of splitting which randomly divides a labeled sample
* into a training set and a validation set. Changing this parameter will create a new resource.
*/
readonly splitRatio: pulumi.Output<string | undefined>;
/**
* The status of the dataset version. Valid values are as follows:
* + **0**: Creating.
* + **1**: Normal.
* + **2**: Deleting.
* + **3**: Deleted.
* + **4**: Exception.
*/
readonly status: pulumi.Output<number>;
/**
* The path to save the manifest file of the version.
*/
readonly storagePath: pulumi.Output<string>;
/**
* The last update time, in UTC format.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Whether the data has been verified by the verification algorithm before publishing.
*/
readonly verification: pulumi.Output<boolean>;
/**
* The version ID.
*/
readonly versionId: pulumi.Output<string>;
/**
* Create a DatasetVersion 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: DatasetVersionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DatasetVersion resources.
*/
export interface DatasetVersionState {
/**
* The creation time, in UTC format.
*/
createdAt?: pulumi.Input<string>;
/**
* Specifies the ID of dataset.
* Changing this parameter will create a new resource.
*/
datasetId?: pulumi.Input<string>;
/**
* Specifies the description of dataset version. It contains a maximum of
* `256` characters and cannot contain special characters `!<>=&"'`. Changing this parameter will create a new resource.
*/
description?: pulumi.Input<string>;
/**
* The total number of samples.
*/
files?: pulumi.Input<number>;
/**
* Specifies whether to enable ModelArts to write the hard example
* attributes (difficult, hard-coefficient, and hard-reasons) into the XML and manifest labeling files. ModelArts will
* use these attributes to optimize hard example filtering. Default value is `false`.
* Changing this parameter will create a new resource.
*/
hardExample?: pulumi.Input<boolean>;
/**
* Whether this version is current version.
*/
isCurrent?: pulumi.Input<boolean>;
/**
* The label type of the dataset version. Valid values are as follows:
* + **multi**: Indicates that there are multi-label samples.
* + **single**: Indicates that all samples are single-label.
* + **unlabeled**: Indicates that all samples are unlabeled.
*/
labelingType?: pulumi.Input<string>;
/**
* Specifies the name of the dataset version. The name consists of `1` to `32`
* characters. Only letters, Chinese characters, digits underscores (_) and hyphens (-) are allowed.
* Changing this parameter will create a new resource.
*/
name?: pulumi.Input<string>;
/**
* The region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the ratio of splitting which randomly divides a labeled sample
* into a training set and a validation set. Changing this parameter will create a new resource.
*/
splitRatio?: pulumi.Input<string>;
/**
* The status of the dataset version. Valid values are as follows:
* + **0**: Creating.
* + **1**: Normal.
* + **2**: Deleting.
* + **3**: Deleted.
* + **4**: Exception.
*/
status?: pulumi.Input<number>;
/**
* The path to save the manifest file of the version.
*/
storagePath?: pulumi.Input<string>;
/**
* The last update time, in UTC format.
*/
updatedAt?: pulumi.Input<string>;
/**
* Whether the data has been verified by the verification algorithm before publishing.
*/
verification?: pulumi.Input<boolean>;
/**
* The version ID.
*/
versionId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a DatasetVersion resource.
*/
export interface DatasetVersionArgs {
/**
* Specifies the ID of dataset.
* Changing this parameter will create a new resource.
*/
datasetId: pulumi.Input<string>;
/**
* Specifies the description of dataset version. It contains a maximum of
* `256` characters and cannot contain special characters `!<>=&"'`. Changing this parameter will create a new resource.
*/
description?: pulumi.Input<string>;
/**
* Specifies whether to enable ModelArts to write the hard example
* attributes (difficult, hard-coefficient, and hard-reasons) into the XML and manifest labeling files. ModelArts will
* use these attributes to optimize hard example filtering. Default value is `false`.
* Changing this parameter will create a new resource.
*/
hardExample?: pulumi.Input<boolean>;
/**
* Specifies the name of the dataset version. The name consists of `1` to `32`
* characters. Only letters, Chinese characters, digits underscores (_) and hyphens (-) are allowed.
* Changing this parameter will create a new resource.
*/
name?: pulumi.Input<string>;
/**
* The region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the ratio of splitting which randomly divides a labeled sample
* into a training set and a validation set. Changing this parameter will create a new resource.
*/
splitRatio?: pulumi.Input<string>;
}