dis

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgVersion added in v0.0.2

func PkgVersion() (semver.Version, error)

PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.

Types

type Stream

type Stream struct {
	pulumi.CustomResourceState

	// Maximum number of partition for automatic scaling.
	// Changing this parameter will create a new resource.
	AutoScaleMaxPartitionCount pulumi.IntOutput `pulumi:"autoScaleMaxPartitionCount"`
	// Minimum number of partition for automatic scaling.
	// Changing this parameter will create a new resource.
	AutoScaleMinPartitionCount pulumi.IntOutput `pulumi:"autoScaleMinPartitionCount"`
	// Data compression type. The value is one of snappy, gzip and zip.
	// Changing this parameter will create a new resource.
	CompressionFormat pulumi.StringOutput `pulumi:"compressionFormat"`
	// Timestamp at which the DIS stream was created.
	Created pulumi.IntOutput `pulumi:"created"`
	// Field separator for CSV file. Changing this parameter will create a new
	// resource.
	CsvDelimiter pulumi.StringOutput `pulumi:"csvDelimiter"`
	// User's JOSN, CSV format data schema, described with Avro schema. Changing
	// this parameter will create a new resource.
	DataSchema pulumi.StringOutput `pulumi:"dataSchema"`
	// 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.StringOutput `pulumi:"dataType"`
	// 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.StringOutput `pulumi:"enterpriseProjectId"`
	// 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.IntOutput `pulumi:"partitionCount"`
	// The information of stream partitions. Structure is documented below.
	Partitions StreamPartitionArrayOutput `pulumi:"partitions"`
	// Total number of readable partitions (including partitions in ACTIVE state only).
	ReadablePartitionCount pulumi.IntOutput `pulumi:"readablePartitionCount"`
	// 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.StringOutput `pulumi:"region"`
	// 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.IntPtrOutput `pulumi:"retentionPeriod"`
	// The status of the partition.
	Status pulumi.StringOutput `pulumi:"status"`
	// Indicates a stream ID in UUID format.
	StreamId pulumi.StringOutput `pulumi:"streamId"`
	// Name of the DIS stream to be created.
	// Changing this parameter will create a new resource.
	StreamName pulumi.StringOutput `pulumi:"streamName"`
	// Stream Type. The value is COMMON(means 1M bandwidth) or ADVANCED(means 5M
	// bandwidth). Changing this parameter will create a new resource.
	StreamType pulumi.StringOutput `pulumi:"streamType"`
	// Specifies the key/value pairs to associate with the stream.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// Total number of writable partitions (including partitions in ACTIVE and DELETED states).
	WritablePartitionCount pulumi.IntOutput `pulumi:"writablePartitionCount"`
}

Manages DIS Stream resource within HuaweiCloud.

## Example Usage ### Create a stream that type is BLOB

```go package main

import (

"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Dis"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Dis.NewStream(ctx, "stream", &Dis.StreamArgs{
			PartitionCount: pulumi.Int(1),
			StreamName:     pulumi.String("terraform_test_dis_stream"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Create a stream that type is JSON

```go package main

import (

"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Dis"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Dis.NewStream(ctx, "stream", &Dis.StreamArgs{
			DataSchema:     pulumi.String("{\"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:       pulumi.String("JSON"),
			PartitionCount: pulumi.Int(1),
			StreamName:     pulumi.String("terraform_test_dis_stream"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Dis stream can be imported by `stream_name`. For example,

```sh

$ pulumi import huaweicloud:Dis/stream:Stream example _abc123

```

func GetStream

func GetStream(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *StreamState, opts ...pulumi.ResourceOption) (*Stream, error)

GetStream gets an existing Stream resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewStream

func NewStream(ctx *pulumi.Context,
	name string, args *StreamArgs, opts ...pulumi.ResourceOption) (*Stream, error)

NewStream registers a new resource with the given unique name, arguments, and options.

func (*Stream) ElementType

func (*Stream) ElementType() reflect.Type

func (*Stream) ToStreamOutput

func (i *Stream) ToStreamOutput() StreamOutput

func (*Stream) ToStreamOutputWithContext

func (i *Stream) ToStreamOutputWithContext(ctx context.Context) StreamOutput

type StreamArgs

type StreamArgs struct {
	// Maximum number of partition for automatic scaling.
	// Changing this parameter will create a new resource.
	AutoScaleMaxPartitionCount pulumi.IntPtrInput
	// Minimum number of partition for automatic scaling.
	// Changing this parameter will create a new resource.
	AutoScaleMinPartitionCount pulumi.IntPtrInput
	// Data compression type. The value is one of snappy, gzip and zip.
	// Changing this parameter will create a new resource.
	CompressionFormat pulumi.StringPtrInput
	// Field separator for CSV file. Changing this parameter will create a new
	// resource.
	CsvDelimiter pulumi.StringPtrInput
	// User's JOSN, CSV format data schema, described with Avro schema. Changing
	// this parameter will create a new resource.
	DataSchema pulumi.StringPtrInput
	// 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.StringPtrInput
	// 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.StringPtrInput
	// 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.IntInput
	// 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.StringPtrInput
	// 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.IntPtrInput
	// Name of the DIS stream to be created.
	// Changing this parameter will create a new resource.
	StreamName pulumi.StringInput
	// Stream Type. The value is COMMON(means 1M bandwidth) or ADVANCED(means 5M
	// bandwidth). Changing this parameter will create a new resource.
	StreamType pulumi.StringPtrInput
	// Specifies the key/value pairs to associate with the stream.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a Stream resource.

func (StreamArgs) ElementType

func (StreamArgs) ElementType() reflect.Type

type StreamArray

type StreamArray []StreamInput

func (StreamArray) ElementType

func (StreamArray) ElementType() reflect.Type

func (StreamArray) ToStreamArrayOutput

func (i StreamArray) ToStreamArrayOutput() StreamArrayOutput

func (StreamArray) ToStreamArrayOutputWithContext

func (i StreamArray) ToStreamArrayOutputWithContext(ctx context.Context) StreamArrayOutput

type StreamArrayInput

type StreamArrayInput interface {
	pulumi.Input

	ToStreamArrayOutput() StreamArrayOutput
	ToStreamArrayOutputWithContext(context.Context) StreamArrayOutput
}

StreamArrayInput is an input type that accepts StreamArray and StreamArrayOutput values. You can construct a concrete instance of `StreamArrayInput` via:

StreamArray{ StreamArgs{...} }

type StreamArrayOutput

type StreamArrayOutput struct{ *pulumi.OutputState }

func (StreamArrayOutput) ElementType

func (StreamArrayOutput) ElementType() reflect.Type

func (StreamArrayOutput) Index

func (StreamArrayOutput) ToStreamArrayOutput

func (o StreamArrayOutput) ToStreamArrayOutput() StreamArrayOutput

func (StreamArrayOutput) ToStreamArrayOutputWithContext

func (o StreamArrayOutput) ToStreamArrayOutputWithContext(ctx context.Context) StreamArrayOutput

type StreamInput

type StreamInput interface {
	pulumi.Input

	ToStreamOutput() StreamOutput
	ToStreamOutputWithContext(ctx context.Context) StreamOutput
}

type StreamMap

type StreamMap map[string]StreamInput

func (StreamMap) ElementType

func (StreamMap) ElementType() reflect.Type

func (StreamMap) ToStreamMapOutput

func (i StreamMap) ToStreamMapOutput() StreamMapOutput

func (StreamMap) ToStreamMapOutputWithContext

func (i StreamMap) ToStreamMapOutputWithContext(ctx context.Context) StreamMapOutput

type StreamMapInput

type StreamMapInput interface {
	pulumi.Input

	ToStreamMapOutput() StreamMapOutput
	ToStreamMapOutputWithContext(context.Context) StreamMapOutput
}

StreamMapInput is an input type that accepts StreamMap and StreamMapOutput values. You can construct a concrete instance of `StreamMapInput` via:

StreamMap{ "key": StreamArgs{...} }

type StreamMapOutput

type StreamMapOutput struct{ *pulumi.OutputState }

func (StreamMapOutput) ElementType

func (StreamMapOutput) ElementType() reflect.Type

func (StreamMapOutput) MapIndex

func (StreamMapOutput) ToStreamMapOutput

func (o StreamMapOutput) ToStreamMapOutput() StreamMapOutput

func (StreamMapOutput) ToStreamMapOutputWithContext

func (o StreamMapOutput) ToStreamMapOutputWithContext(ctx context.Context) StreamMapOutput

type StreamOutput

type StreamOutput struct{ *pulumi.OutputState }

func (StreamOutput) AutoScaleMaxPartitionCount

func (o StreamOutput) AutoScaleMaxPartitionCount() pulumi.IntOutput

Maximum number of partition for automatic scaling. Changing this parameter will create a new resource.

func (StreamOutput) AutoScaleMinPartitionCount

func (o StreamOutput) AutoScaleMinPartitionCount() pulumi.IntOutput

Minimum number of partition for automatic scaling. Changing this parameter will create a new resource.

func (StreamOutput) CompressionFormat

func (o StreamOutput) CompressionFormat() pulumi.StringOutput

Data compression type. The value is one of snappy, gzip and zip. Changing this parameter will create a new resource.

func (StreamOutput) Created

func (o StreamOutput) Created() pulumi.IntOutput

Timestamp at which the DIS stream was created.

func (StreamOutput) CsvDelimiter

func (o StreamOutput) CsvDelimiter() pulumi.StringOutput

Field separator for CSV file. Changing this parameter will create a new resource.

func (StreamOutput) DataSchema

func (o StreamOutput) DataSchema() pulumi.StringOutput

User's JOSN, CSV format data schema, described with Avro schema. Changing this parameter will create a new resource.

func (StreamOutput) DataType

func (o StreamOutput) DataType() pulumi.StringOutput

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.

func (StreamOutput) ElementType

func (StreamOutput) ElementType() reflect.Type

func (StreamOutput) EnterpriseProjectId

func (o StreamOutput) EnterpriseProjectId() pulumi.StringOutput

Specifies the enterprise project id of the dis stream, Value 0 indicates the default enterprise project. Changing this parameter will create a new resource.

func (StreamOutput) PartitionCount

func (o StreamOutput) PartitionCount() pulumi.IntOutput

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.

func (StreamOutput) Partitions

The information of stream partitions. Structure is documented below.

func (StreamOutput) ReadablePartitionCount

func (o StreamOutput) ReadablePartitionCount() pulumi.IntOutput

Total number of readable partitions (including partitions in ACTIVE state only).

func (StreamOutput) Region

func (o StreamOutput) Region() pulumi.StringOutput

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.

func (StreamOutput) RetentionPeriod

func (o StreamOutput) RetentionPeriod() pulumi.IntPtrOutput

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.

func (StreamOutput) Status

func (o StreamOutput) Status() pulumi.StringOutput

The status of the partition.

func (StreamOutput) StreamId

func (o StreamOutput) StreamId() pulumi.StringOutput

Indicates a stream ID in UUID format.

func (StreamOutput) StreamName

func (o StreamOutput) StreamName() pulumi.StringOutput

Name of the DIS stream to be created. Changing this parameter will create a new resource.

func (StreamOutput) StreamType

func (o StreamOutput) StreamType() pulumi.StringOutput

Stream Type. The value is COMMON(means 1M bandwidth) or ADVANCED(means 5M bandwidth). Changing this parameter will create a new resource.

func (StreamOutput) Tags

Specifies the key/value pairs to associate with the stream.

func (StreamOutput) ToStreamOutput

func (o StreamOutput) ToStreamOutput() StreamOutput

func (StreamOutput) ToStreamOutputWithContext

func (o StreamOutput) ToStreamOutputWithContext(ctx context.Context) StreamOutput

func (StreamOutput) WritablePartitionCount

func (o StreamOutput) WritablePartitionCount() pulumi.IntOutput

Total number of writable partitions (including partitions in ACTIVE and DELETED states).

type StreamPartition

type StreamPartition struct {
	// Possible value range of the hash key used by each partition.
	HashRange *string `pulumi:"hashRange"`
	// The ID of the partition.
	Id *string `pulumi:"id"`
	// Sequence number range of each partition.
	SequenceNumberRange *string `pulumi:"sequenceNumberRange"`
	// The status of the partition.
	Status *string `pulumi:"status"`
}

type StreamPartitionArgs

type StreamPartitionArgs struct {
	// Possible value range of the hash key used by each partition.
	HashRange pulumi.StringPtrInput `pulumi:"hashRange"`
	// The ID of the partition.
	Id pulumi.StringPtrInput `pulumi:"id"`
	// Sequence number range of each partition.
	SequenceNumberRange pulumi.StringPtrInput `pulumi:"sequenceNumberRange"`
	// The status of the partition.
	Status pulumi.StringPtrInput `pulumi:"status"`
}

func (StreamPartitionArgs) ElementType

func (StreamPartitionArgs) ElementType() reflect.Type

func (StreamPartitionArgs) ToStreamPartitionOutput

func (i StreamPartitionArgs) ToStreamPartitionOutput() StreamPartitionOutput

func (StreamPartitionArgs) ToStreamPartitionOutputWithContext

func (i StreamPartitionArgs) ToStreamPartitionOutputWithContext(ctx context.Context) StreamPartitionOutput

type StreamPartitionArray

type StreamPartitionArray []StreamPartitionInput

func (StreamPartitionArray) ElementType

func (StreamPartitionArray) ElementType() reflect.Type

func (StreamPartitionArray) ToStreamPartitionArrayOutput

func (i StreamPartitionArray) ToStreamPartitionArrayOutput() StreamPartitionArrayOutput

func (StreamPartitionArray) ToStreamPartitionArrayOutputWithContext

func (i StreamPartitionArray) ToStreamPartitionArrayOutputWithContext(ctx context.Context) StreamPartitionArrayOutput

type StreamPartitionArrayInput

type StreamPartitionArrayInput interface {
	pulumi.Input

	ToStreamPartitionArrayOutput() StreamPartitionArrayOutput
	ToStreamPartitionArrayOutputWithContext(context.Context) StreamPartitionArrayOutput
}

StreamPartitionArrayInput is an input type that accepts StreamPartitionArray and StreamPartitionArrayOutput values. You can construct a concrete instance of `StreamPartitionArrayInput` via:

StreamPartitionArray{ StreamPartitionArgs{...} }

type StreamPartitionArrayOutput

type StreamPartitionArrayOutput struct{ *pulumi.OutputState }

func (StreamPartitionArrayOutput) ElementType

func (StreamPartitionArrayOutput) ElementType() reflect.Type

func (StreamPartitionArrayOutput) Index

func (StreamPartitionArrayOutput) ToStreamPartitionArrayOutput

func (o StreamPartitionArrayOutput) ToStreamPartitionArrayOutput() StreamPartitionArrayOutput

func (StreamPartitionArrayOutput) ToStreamPartitionArrayOutputWithContext

func (o StreamPartitionArrayOutput) ToStreamPartitionArrayOutputWithContext(ctx context.Context) StreamPartitionArrayOutput

type StreamPartitionInput

type StreamPartitionInput interface {
	pulumi.Input

	ToStreamPartitionOutput() StreamPartitionOutput
	ToStreamPartitionOutputWithContext(context.Context) StreamPartitionOutput
}

StreamPartitionInput is an input type that accepts StreamPartitionArgs and StreamPartitionOutput values. You can construct a concrete instance of `StreamPartitionInput` via:

StreamPartitionArgs{...}

type StreamPartitionOutput

type StreamPartitionOutput struct{ *pulumi.OutputState }

func (StreamPartitionOutput) ElementType

func (StreamPartitionOutput) ElementType() reflect.Type

func (StreamPartitionOutput) HashRange

Possible value range of the hash key used by each partition.

func (StreamPartitionOutput) Id

The ID of the partition.

func (StreamPartitionOutput) SequenceNumberRange

func (o StreamPartitionOutput) SequenceNumberRange() pulumi.StringPtrOutput

Sequence number range of each partition.

func (StreamPartitionOutput) Status

The status of the partition.

func (StreamPartitionOutput) ToStreamPartitionOutput

func (o StreamPartitionOutput) ToStreamPartitionOutput() StreamPartitionOutput

func (StreamPartitionOutput) ToStreamPartitionOutputWithContext

func (o StreamPartitionOutput) ToStreamPartitionOutputWithContext(ctx context.Context) StreamPartitionOutput

type StreamState

type StreamState struct {
	// Maximum number of partition for automatic scaling.
	// Changing this parameter will create a new resource.
	AutoScaleMaxPartitionCount pulumi.IntPtrInput
	// Minimum number of partition for automatic scaling.
	// Changing this parameter will create a new resource.
	AutoScaleMinPartitionCount pulumi.IntPtrInput
	// Data compression type. The value is one of snappy, gzip and zip.
	// Changing this parameter will create a new resource.
	CompressionFormat pulumi.StringPtrInput
	// Timestamp at which the DIS stream was created.
	Created pulumi.IntPtrInput
	// Field separator for CSV file. Changing this parameter will create a new
	// resource.
	CsvDelimiter pulumi.StringPtrInput
	// User's JOSN, CSV format data schema, described with Avro schema. Changing
	// this parameter will create a new resource.
	DataSchema pulumi.StringPtrInput
	// 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.StringPtrInput
	// 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.StringPtrInput
	// 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.IntPtrInput
	// The information of stream partitions. Structure is documented below.
	Partitions StreamPartitionArrayInput
	// Total number of readable partitions (including partitions in ACTIVE state only).
	ReadablePartitionCount pulumi.IntPtrInput
	// 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.StringPtrInput
	// 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.IntPtrInput
	// The status of the partition.
	Status pulumi.StringPtrInput
	// Indicates a stream ID in UUID format.
	StreamId pulumi.StringPtrInput
	// Name of the DIS stream to be created.
	// Changing this parameter will create a new resource.
	StreamName pulumi.StringPtrInput
	// Stream Type. The value is COMMON(means 1M bandwidth) or ADVANCED(means 5M
	// bandwidth). Changing this parameter will create a new resource.
	StreamType pulumi.StringPtrInput
	// Specifies the key/value pairs to associate with the stream.
	Tags pulumi.StringMapInput
	// Total number of writable partitions (including partitions in ACTIVE and DELETED states).
	WritablePartitionCount pulumi.IntPtrInput
}

func (StreamState) ElementType

func (StreamState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL