@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
324 lines (323 loc) • 12.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages DIS Stream resource within HuaweiCloud.
*
* ## Example Usage
* ### Create a stream that type is BLOB
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const stream = new huaweicloud.Dis.Stream("stream", {
* partitionCount: 1,
* streamName: "terraform_test_dis_stream",
* });
* ```
* ### Create a stream that type is JSON
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const stream = new huaweicloud.Dis.Stream("stream", {
* dataSchema: "{\"type\":\"record\",\"name\":\"RecordName\",\"fields\":[{\"name\":\"id\",\"type\":\"string\",\"doc\":\"Type inferred from '\\\"2017/10/11 11:11:11\\\"'\"},{\"name\":\"info\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"info\",\"fields\":[{\"name\":\"date\",\"type\":\"string\",\"doc\":\"Type inferred from '\\\"2018/10/11 11:11:11\\\"'\"}]}},\"doc\":\"Type inferred from '[{\\\"date\\\":\\\"2018/10/11 11:11:11\\\"}]'\"}]}",
* dataType: "JSON",
* partitionCount: 1,
* streamName: "terraform_test_dis_stream",
* });
* ```
*
* ## Import
*
* Dis stream can be imported by `stream_name`. For example, bash
*
* ```sh
* $ pulumi import huaweicloud:Dis/stream:Stream example _abc123
* ```
*/
export declare class Stream extends pulumi.CustomResource {
/**
* Get an existing Stream 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?: StreamState, opts?: pulumi.CustomResourceOptions): Stream;
/**
* Returns true if the given object is an instance of Stream. 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 Stream;
/**
* Maximum number of partition for automatic scaling.
* Changing this parameter will create a new resource.
*/
readonly autoScaleMaxPartitionCount: pulumi.Output<number>;
/**
* Minimum number of partition for automatic scaling.
* Changing this parameter will create a new resource.
*/
readonly autoScaleMinPartitionCount: pulumi.Output<number>;
/**
* Data compression type. The value is one of snappy, gzip and zip.
* Changing this parameter will create a new resource.
*/
readonly compressionFormat: pulumi.Output<string>;
/**
* Timestamp at which the DIS stream was created.
*/
readonly created: pulumi.Output<number>;
/**
* Field separator for CSV file. Changing this parameter will create a new
* resource.
*/
readonly csvDelimiter: pulumi.Output<string>;
/**
* User's JSON, CSV format data schema, described with Avro schema. Changing
* this parameter will create a new resource.
*/
readonly dataSchema: pulumi.Output<string>;
/**
* Data type of the data putting into the stream. The value is one of **BLOB**,
* **JSON** and **CSV**. Changing this parameter will create a new resource.
*/
readonly dataType: pulumi.Output<string>;
/**
* Specifies the enterprise project id of the dis stream, Value 0
* indicates the default enterprise project. Changing this parameter will create a new resource.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Number of the expect partitions. NOTE: Each stream can be scaled up and down a
* total of five times within one hour. After the stream is successfully scaled up or down, it cannot be scaled up or
* down again within the next one hour.
*/
readonly partitionCount: pulumi.Output<number>;
/**
* The information of stream partitions. Structure is documented below.
*/
readonly partitions: pulumi.Output<outputs.Dis.StreamPartition[]>;
/**
* Total number of readable partitions (including partitions in ACTIVE state only).
*/
readonly readablePartitionCount: pulumi.Output<number>;
/**
* The region in which to create the DIS stream resource. If omitted, the
* provider-level region will be used. Changing this creates a new DIS Stream resource.
*/
readonly region: pulumi.Output<string>;
/**
* The number of hours for which data from the stream will be retained in DIS.
* Value range: `24` to `72`. Unit: **hour**. Default:`24`. Changing this parameter will create a new resource.
*/
readonly retentionPeriod: pulumi.Output<number | undefined>;
/**
* The status of the partition.
*/
readonly status: pulumi.Output<string>;
/**
* Indicates a stream ID in UUID format.
*/
readonly streamId: pulumi.Output<string>;
/**
* Name of the DIS stream to be created.
* Changing this parameter will create a new resource.
*/
readonly streamName: pulumi.Output<string>;
/**
* Stream Type. The value is COMMON(means 1M bandwidth) or ADVANCED(means 5M
* bandwidth). Changing this parameter will create a new resource.
*/
readonly streamType: pulumi.Output<string>;
/**
* Specifies the key/value pairs to associate with the stream.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Total number of writable partitions (including partitions in ACTIVE and DELETED states).
*/
readonly writablePartitionCount: pulumi.Output<number>;
/**
* Create a Stream 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: StreamArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Stream resources.
*/
export interface StreamState {
/**
* Maximum number of partition for automatic scaling.
* Changing this parameter will create a new resource.
*/
autoScaleMaxPartitionCount?: pulumi.Input<number>;
/**
* Minimum number of partition for automatic scaling.
* Changing this parameter will create a new resource.
*/
autoScaleMinPartitionCount?: pulumi.Input<number>;
/**
* Data compression type. The value is one of snappy, gzip and zip.
* Changing this parameter will create a new resource.
*/
compressionFormat?: pulumi.Input<string>;
/**
* Timestamp at which the DIS stream was created.
*/
created?: pulumi.Input<number>;
/**
* Field separator for CSV file. Changing this parameter will create a new
* resource.
*/
csvDelimiter?: pulumi.Input<string>;
/**
* User's JSON, CSV format data schema, described with Avro schema. Changing
* this parameter will create a new resource.
*/
dataSchema?: pulumi.Input<string>;
/**
* Data type of the data putting into the stream. The value is one of **BLOB**,
* **JSON** and **CSV**. Changing this parameter will create a new resource.
*/
dataType?: pulumi.Input<string>;
/**
* Specifies the enterprise project id of the dis stream, Value 0
* indicates the default enterprise project. Changing this parameter will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Number of the expect partitions. NOTE: Each stream can be scaled up and down a
* total of five times within one hour. After the stream is successfully scaled up or down, it cannot be scaled up or
* down again within the next one hour.
*/
partitionCount?: pulumi.Input<number>;
/**
* The information of stream partitions. Structure is documented below.
*/
partitions?: pulumi.Input<pulumi.Input<inputs.Dis.StreamPartition>[]>;
/**
* Total number of readable partitions (including partitions in ACTIVE state only).
*/
readablePartitionCount?: pulumi.Input<number>;
/**
* The region in which to create the DIS stream resource. If omitted, the
* provider-level region will be used. Changing this creates a new DIS Stream resource.
*/
region?: pulumi.Input<string>;
/**
* The number of hours for which data from the stream will be retained in DIS.
* Value range: `24` to `72`. Unit: **hour**. Default:`24`. Changing this parameter will create a new resource.
*/
retentionPeriod?: pulumi.Input<number>;
/**
* The status of the partition.
*/
status?: pulumi.Input<string>;
/**
* Indicates a stream ID in UUID format.
*/
streamId?: pulumi.Input<string>;
/**
* Name of the DIS stream to be created.
* Changing this parameter will create a new resource.
*/
streamName?: pulumi.Input<string>;
/**
* Stream Type. The value is COMMON(means 1M bandwidth) or ADVANCED(means 5M
* bandwidth). Changing this parameter will create a new resource.
*/
streamType?: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the stream.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Total number of writable partitions (including partitions in ACTIVE and DELETED states).
*/
writablePartitionCount?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Stream resource.
*/
export interface StreamArgs {
/**
* Maximum number of partition for automatic scaling.
* Changing this parameter will create a new resource.
*/
autoScaleMaxPartitionCount?: pulumi.Input<number>;
/**
* Minimum number of partition for automatic scaling.
* Changing this parameter will create a new resource.
*/
autoScaleMinPartitionCount?: pulumi.Input<number>;
/**
* Data compression type. The value is one of snappy, gzip and zip.
* Changing this parameter will create a new resource.
*/
compressionFormat?: pulumi.Input<string>;
/**
* Field separator for CSV file. Changing this parameter will create a new
* resource.
*/
csvDelimiter?: pulumi.Input<string>;
/**
* User's JSON, CSV format data schema, described with Avro schema. Changing
* this parameter will create a new resource.
*/
dataSchema?: pulumi.Input<string>;
/**
* Data type of the data putting into the stream. The value is one of **BLOB**,
* **JSON** and **CSV**. Changing this parameter will create a new resource.
*/
dataType?: pulumi.Input<string>;
/**
* Specifies the enterprise project id of the dis stream, Value 0
* indicates the default enterprise project. Changing this parameter will create a new resource.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Number of the expect partitions. NOTE: Each stream can be scaled up and down a
* total of five times within one hour. After the stream is successfully scaled up or down, it cannot be scaled up or
* down again within the next one hour.
*/
partitionCount: pulumi.Input<number>;
/**
* The region in which to create the DIS stream resource. If omitted, the
* provider-level region will be used. Changing this creates a new DIS Stream resource.
*/
region?: pulumi.Input<string>;
/**
* The number of hours for which data from the stream will be retained in DIS.
* Value range: `24` to `72`. Unit: **hour**. Default:`24`. Changing this parameter will create a new resource.
*/
retentionPeriod?: pulumi.Input<number>;
/**
* Name of the DIS stream to be created.
* Changing this parameter will create a new resource.
*/
streamName: pulumi.Input<string>;
/**
* Stream Type. The value is COMMON(means 1M bandwidth) or ADVANCED(means 5M
* bandwidth). Changing this parameter will create a new resource.
*/
streamType?: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the stream.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}