@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
362 lines (361 loc) • 13.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages DLI Queue resource within HuaweiCloud
*
* ## Example Usage
* ### Create an exclusive mode queue
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const elasticResourcePoolName = config.requireObject("elasticResourcePoolName");
* const queueName = config.requireObject("queueName");
* const test = new huaweicloud.dli.Queue("test", {
* elasticResourcePoolName: elasticResourcePoolName,
* resourceMode: 1,
* cuCount: 16,
* tags: {
* foo: "bar",
* key: "value",
* },
* });
* ```
*
* ## Import
*
* ### Import a SQL type queue bash
*
* ```sh
* $ pulumi import huaweicloud:Dli/queue:Queue test <name>
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response. The missing attributes include`tags`. It is generally recommended running `terraform plan` after importing a DLI queue. You can then decide if changes should be applied to the resource, or the resource definition should be updated to align with the resource. Also you can ignore changes as below. hcl resource "huaweicloud_dli_queue" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* tags
*
* ]
*
* } }
*/
export declare class Queue extends pulumi.CustomResource {
/**
* Get an existing Queue 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?: QueueState, opts?: pulumi.CustomResourceOptions): Queue;
/**
* Returns true if the given object is an instance of Queue. 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 Queue;
/**
* Time when a queue is created.
*/
readonly createTime: pulumi.Output<number>;
/**
* Minimum number of CUs that are bound to a queue. Initial value can be `16`,
* `64`, or `256`. When scaleOut or scale_in, the number must be a multiple of `16`.
*/
readonly cuCount: pulumi.Output<number>;
/**
* Description of a queue. Changing this parameter will create a new
* resource.
*/
readonly description: pulumi.Output<string>;
/**
* Specifies the name of the elastic resource pool to which the queue
* belongs.
*/
readonly elasticResourcePoolName: pulumi.Output<string>;
/**
* Enterprise project ID. The value 0 indicates the default
* enterprise project. Changing this parameter will create a new resource.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Indicates the queue feature. Changing this parameter will create a new
* resource. The options are as follows:
* + basic: basic type (default value)
* + ai: AI-enhanced (Only the SQL x8664 dedicated queue supports this option.)
*/
readonly feature: pulumi.Output<string | undefined>;
/**
* @deprecated management_subnet_cidr is Deprecated
*/
readonly managementSubnetCidr: pulumi.Output<string | undefined>;
/**
* Name of a queue. Name of a newly created resource queue. The name can contain
* only digits, lowercase letters, and underscores (\_), but cannot contain only digits or start with an underscore (_).
* Length range: `1` to `128` characters. Changing this parameter will create a new resource.
*/
readonly name: pulumi.Output<string>;
/**
* CPU architecture of queue compute resources. Changing this parameter will
* create a new resource. The options are as follows:
* + x8664 : default value
* + aarch64
*/
readonly platform: pulumi.Output<string | undefined>;
/**
* Indicates the queue type. Changing this parameter will create a new
* resource. The options are as follows:
* + sql
* + general
*/
readonly queueType: pulumi.Output<string | undefined>;
/**
* Specifies the region in which to create the dli queue resource. If omitted,
* the provider-level region will be used. Changing this will create a new VPC channel resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the queue resource mode.
* The valid value is as follows:
* + 1: indicates the exclusive resource mode.
*/
readonly resourceMode: pulumi.Output<number>;
/**
* Specifies the list of scaling policies of the queue associated with
* an elastic resource pool.
* This parameter is only available if `resourceMode` is set to `1`.
* If you want to use this parameter, you must ensure that there is a scaling policy with a time period from `00:00` to `24:00`.
* The scalingPolicies structure is documented below.
*/
readonly scalingPolicies: pulumi.Output<outputs.Dli.QueueScalingPolicy[]>;
/**
* Specifies spark driver configuration of the queue.
* This parameter is only available if `queueType` is set to `sql`.
* The sparkDriver structure is documented below.
*/
readonly sparkDriver: pulumi.Output<outputs.Dli.QueueSparkDriver | undefined>;
/**
* @deprecated subnet_cidr is Deprecated
*/
readonly subnetCidr: pulumi.Output<string | undefined>;
/**
* Label of a queue. Changing this parameter will create a new resource.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The CIDR block of the queue.
*/
readonly vpcCidr: pulumi.Output<string>;
/**
* Create a Queue 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: QueueArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Queue resources.
*/
export interface QueueState {
/**
* Time when a queue is created.
*/
createTime?: pulumi.Input<number>;
/**
* Minimum number of CUs that are bound to a queue. Initial value can be `16`,
* `64`, or `256`. When scaleOut or scale_in, the number must be a multiple of `16`.
*/
cuCount?: pulumi.Input<number>;
/**
* Description of a queue. Changing this parameter will create a new
* resource.
*/
description?: pulumi.Input<string>;
/**
* Specifies the name of the elastic resource pool to which the queue
* belongs.
*/
elasticResourcePoolName?: pulumi.Input<string>;
/**
* Enterprise project ID. The value 0 indicates the default
* enterprise project. Changing this parameter will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Indicates the queue feature. Changing this parameter will create a new
* resource. The options are as follows:
* + basic: basic type (default value)
* + ai: AI-enhanced (Only the SQL x8664 dedicated queue supports this option.)
*/
feature?: pulumi.Input<string>;
/**
* @deprecated management_subnet_cidr is Deprecated
*/
managementSubnetCidr?: pulumi.Input<string>;
/**
* Name of a queue. Name of a newly created resource queue. The name can contain
* only digits, lowercase letters, and underscores (\_), but cannot contain only digits or start with an underscore (_).
* Length range: `1` to `128` characters. Changing this parameter will create a new resource.
*/
name?: pulumi.Input<string>;
/**
* CPU architecture of queue compute resources. Changing this parameter will
* create a new resource. The options are as follows:
* + x8664 : default value
* + aarch64
*/
platform?: pulumi.Input<string>;
/**
* Indicates the queue type. Changing this parameter will create a new
* resource. The options are as follows:
* + sql
* + general
*/
queueType?: pulumi.Input<string>;
/**
* Specifies the region in which to create the dli queue resource. If omitted,
* the provider-level region will be used. Changing this will create a new VPC channel resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the queue resource mode.
* The valid value is as follows:
* + 1: indicates the exclusive resource mode.
*/
resourceMode?: pulumi.Input<number>;
/**
* Specifies the list of scaling policies of the queue associated with
* an elastic resource pool.
* This parameter is only available if `resourceMode` is set to `1`.
* If you want to use this parameter, you must ensure that there is a scaling policy with a time period from `00:00` to `24:00`.
* The scalingPolicies structure is documented below.
*/
scalingPolicies?: pulumi.Input<pulumi.Input<inputs.Dli.QueueScalingPolicy>[]>;
/**
* Specifies spark driver configuration of the queue.
* This parameter is only available if `queueType` is set to `sql`.
* The sparkDriver structure is documented below.
*/
sparkDriver?: pulumi.Input<inputs.Dli.QueueSparkDriver>;
/**
* @deprecated subnet_cidr is Deprecated
*/
subnetCidr?: pulumi.Input<string>;
/**
* Label of a queue. Changing this parameter will create a new resource.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The CIDR block of the queue.
*/
vpcCidr?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Queue resource.
*/
export interface QueueArgs {
/**
* Minimum number of CUs that are bound to a queue. Initial value can be `16`,
* `64`, or `256`. When scaleOut or scale_in, the number must be a multiple of `16`.
*/
cuCount: pulumi.Input<number>;
/**
* Description of a queue. Changing this parameter will create a new
* resource.
*/
description?: pulumi.Input<string>;
/**
* Specifies the name of the elastic resource pool to which the queue
* belongs.
*/
elasticResourcePoolName?: pulumi.Input<string>;
/**
* Enterprise project ID. The value 0 indicates the default
* enterprise project. Changing this parameter will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Indicates the queue feature. Changing this parameter will create a new
* resource. The options are as follows:
* + basic: basic type (default value)
* + ai: AI-enhanced (Only the SQL x8664 dedicated queue supports this option.)
*/
feature?: pulumi.Input<string>;
/**
* @deprecated management_subnet_cidr is Deprecated
*/
managementSubnetCidr?: pulumi.Input<string>;
/**
* Name of a queue. Name of a newly created resource queue. The name can contain
* only digits, lowercase letters, and underscores (\_), but cannot contain only digits or start with an underscore (_).
* Length range: `1` to `128` characters. Changing this parameter will create a new resource.
*/
name?: pulumi.Input<string>;
/**
* CPU architecture of queue compute resources. Changing this parameter will
* create a new resource. The options are as follows:
* + x8664 : default value
* + aarch64
*/
platform?: pulumi.Input<string>;
/**
* Indicates the queue type. Changing this parameter will create a new
* resource. The options are as follows:
* + sql
* + general
*/
queueType?: pulumi.Input<string>;
/**
* Specifies the region in which to create the dli queue resource. If omitted,
* the provider-level region will be used. Changing this will create a new VPC channel resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the queue resource mode.
* The valid value is as follows:
* + 1: indicates the exclusive resource mode.
*/
resourceMode?: pulumi.Input<number>;
/**
* Specifies the list of scaling policies of the queue associated with
* an elastic resource pool.
* This parameter is only available if `resourceMode` is set to `1`.
* If you want to use this parameter, you must ensure that there is a scaling policy with a time period from `00:00` to `24:00`.
* The scalingPolicies structure is documented below.
*/
scalingPolicies?: pulumi.Input<pulumi.Input<inputs.Dli.QueueScalingPolicy>[]>;
/**
* Specifies spark driver configuration of the queue.
* This parameter is only available if `queueType` is set to `sql`.
* The sparkDriver structure is documented below.
*/
sparkDriver?: pulumi.Input<inputs.Dli.QueueSparkDriver>;
/**
* @deprecated subnet_cidr is Deprecated
*/
subnetCidr?: pulumi.Input<string>;
/**
* Label of a queue. Changing this parameter will create a new resource.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The CIDR block of the queue.
*/
vpcCidr?: pulumi.Input<string>;
}