datahub

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	pulumi.CustomResourceState

	// Comment of the datahub project. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrOutput `pulumi:"comment"`
	// Create time of the datahub project. It is a human-readable string rather than 64-bits UTC.
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// Last modify time of the datahub project. It is the same as *create_time* at the beginning. It is also a human-readable string rather than 64-bits UTC.
	LastModifyTime pulumi.StringOutput `pulumi:"lastModifyTime"`
	// The name of the datahub project. Its length is limited to 3-32 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	Name pulumi.StringOutput `pulumi:"name"`
}

The project is the basic unit of resource management in Datahub Service and is used to isolate and control resources. It contains a set of Topics. You can manage the datahub sources of an application by using projects. [Refer to details](https://help.aliyun.com/document_detail/47440.html).

> **NOTE:** Currently Datahub service only can be supported in the regions: cn-beijing, cn-hangzhou, cn-shanghai, cn-shenzhen, ap-southeast-1.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/datahub"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datahub.NewProject(ctx, "example", &datahub.ProjectArgs{
			Comment: pulumi.String("created by terraform"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetProject

func GetProject(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error)

GetProject gets an existing Project 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 NewProject

func NewProject(ctx *pulumi.Context,
	name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error)

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

type ProjectArgs

type ProjectArgs struct {
	// Comment of the datahub project. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrInput
	// The name of the datahub project. Its length is limited to 3-32 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	Name pulumi.StringPtrInput
}

The set of arguments for constructing a Project resource.

func (ProjectArgs) ElementType

func (ProjectArgs) ElementType() reflect.Type

type ProjectState

type ProjectState struct {
	// Comment of the datahub project. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrInput
	// Create time of the datahub project. It is a human-readable string rather than 64-bits UTC.
	CreateTime pulumi.StringPtrInput
	// Last modify time of the datahub project. It is the same as *create_time* at the beginning. It is also a human-readable string rather than 64-bits UTC.
	LastModifyTime pulumi.StringPtrInput
	// The name of the datahub project. Its length is limited to 3-32 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	Name pulumi.StringPtrInput
}

func (ProjectState) ElementType

func (ProjectState) ElementType() reflect.Type

type Subscription

type Subscription struct {
	pulumi.CustomResourceState

	// Comment of the datahub subscription. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrOutput `pulumi:"comment"`
	// Create time of the datahub subscription. It is a human-readable string rather than 64-bits UTC.
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// Last modify time of the datahub subscription. It is the same as *create_time* at the beginning. It is also a human-readable string rather than 64-bits UTC.
	LastModifyTime pulumi.StringOutput `pulumi:"lastModifyTime"`
	// The name of the datahub project that the subscription belongs to. Its length is limited to 3-32 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	ProjectName pulumi.StringOutput `pulumi:"projectName"`
	// The identidy of the subscritpion, generate from server side.
	SubId pulumi.StringOutput `pulumi:"subId"`
	// The name of the datahub topic that the subscription belongs to. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	TopicName pulumi.StringOutput `pulumi:"topicName"`
}

The subscription is the basic unit of resource usage in Datahub Service under Publish/Subscribe model. You can manage the relationships between user and topics by using subscriptions. [Refer to details](https://help.aliyun.com/document_detail/47440.html).

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/datahub"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datahub.NewSubscription(ctx, "example", &datahub.SubscriptionArgs{
			Comment:     pulumi.String("created by terraform"),
			ProjectName: pulumi.String("tf_datahub_project"),
			TopicName:   pulumi.String("tf_datahub_topic"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetSubscription

func GetSubscription(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SubscriptionState, opts ...pulumi.ResourceOption) (*Subscription, error)

GetSubscription gets an existing Subscription 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 NewSubscription

func NewSubscription(ctx *pulumi.Context,
	name string, args *SubscriptionArgs, opts ...pulumi.ResourceOption) (*Subscription, error)

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

type SubscriptionArgs

type SubscriptionArgs struct {
	// Comment of the datahub subscription. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrInput
	// The name of the datahub project that the subscription belongs to. Its length is limited to 3-32 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	ProjectName pulumi.StringInput
	// The name of the datahub topic that the subscription belongs to. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	TopicName pulumi.StringInput
}

The set of arguments for constructing a Subscription resource.

func (SubscriptionArgs) ElementType

func (SubscriptionArgs) ElementType() reflect.Type

type SubscriptionState

type SubscriptionState struct {
	// Comment of the datahub subscription. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrInput
	// Create time of the datahub subscription. It is a human-readable string rather than 64-bits UTC.
	CreateTime pulumi.StringPtrInput
	// Last modify time of the datahub subscription. It is the same as *create_time* at the beginning. It is also a human-readable string rather than 64-bits UTC.
	LastModifyTime pulumi.StringPtrInput
	// The name of the datahub project that the subscription belongs to. Its length is limited to 3-32 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	ProjectName pulumi.StringPtrInput
	// The identidy of the subscritpion, generate from server side.
	SubId pulumi.StringPtrInput
	// The name of the datahub topic that the subscription belongs to. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	TopicName pulumi.StringPtrInput
}

func (SubscriptionState) ElementType

func (SubscriptionState) ElementType() reflect.Type

type Topic

type Topic struct {
	pulumi.CustomResourceState

	// Comment of the datahub topic. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrOutput `pulumi:"comment"`
	// Create time of the datahub topic. It is a human-readable string rather than 64-bits UTC.
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// Last modify time of the datahub topic. It is the same as *create_time* at the beginning. It is also a human-readable string rather than 64-bits UTC.
	LastModifyTime pulumi.StringOutput `pulumi:"lastModifyTime"`
	// How many days this topic lives. The permitted range of values is [1, 7]. The default value is 3.
	LifeCycle pulumi.IntPtrOutput `pulumi:"lifeCycle"`
	// The name of the datahub topic. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the datahub project that this topic belongs to. It is case-insensitive.
	ProjectName pulumi.StringOutput `pulumi:"projectName"`
	// Schema of this topic, required only for TUPLE topic. Supported data types (case-insensitive) are:
	// - BIGINT
	// - STRING
	// - BOOLEAN
	// - DOUBLE
	// - TIMESTAMP
	RecordSchema pulumi.MapOutput `pulumi:"recordSchema"`
	// The type of this topic. Its value must be one of {BLOB, TUPLE}. For BLOB topic, data will be organized as binary and encoded by BASE64. For TUPLE topic, data has fixed schema. The default value is "TUPLE" with a schema {STRING}.
	RecordType pulumi.StringPtrOutput `pulumi:"recordType"`
	// The number of shards this topic contains. The permitted range of values is [1, 10]. The default value is 1.
	ShardCount pulumi.IntPtrOutput `pulumi:"shardCount"`
}

The topic is the basic unit of Datahub data source and is used to define one kind of data or stream. It contains a set of subscriptions. You can manage the datahub source of an application by using topics. [Refer to details](https://help.aliyun.com/document_detail/47440.html).

## Example Usage

Basic Usage

- BLob Topic

resource "alicloud_datahub_topic" "example" {
  name         = "tf_datahub_topic"
  project_name = "tf_datahub_project"
  record_type  = "BLOB"
  shard_count  = 3
  life_cycle   = 7
  comment      = "created by terraform"
}
resource "alicloud_datahub_topic" "example" {
  name         = "tf_datahub_topic"
  project_name = "tf_datahub_project"
  record_type  = "TUPLE"
  record_schema = {
    bigint_field    = "BIGINT"
    timestamp_field = "TIMESTAMP"
    string_field    = "STRING"
    double_field    = "DOUBLE"
    boolean_field   = "BOOLEAN"
  }
  shard_count = 3
  life_cycle  = 7
  comment     = "created by terraform"
}

func GetTopic

func GetTopic(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TopicState, opts ...pulumi.ResourceOption) (*Topic, error)

GetTopic gets an existing Topic 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 NewTopic

func NewTopic(ctx *pulumi.Context,
	name string, args *TopicArgs, opts ...pulumi.ResourceOption) (*Topic, error)

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

type TopicArgs

type TopicArgs struct {
	// Comment of the datahub topic. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrInput
	// How many days this topic lives. The permitted range of values is [1, 7]. The default value is 3.
	LifeCycle pulumi.IntPtrInput
	// The name of the datahub topic. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	Name pulumi.StringPtrInput
	// The name of the datahub project that this topic belongs to. It is case-insensitive.
	ProjectName pulumi.StringInput
	// Schema of this topic, required only for TUPLE topic. Supported data types (case-insensitive) are:
	// - BIGINT
	// - STRING
	// - BOOLEAN
	// - DOUBLE
	// - TIMESTAMP
	RecordSchema pulumi.MapInput
	// The type of this topic. Its value must be one of {BLOB, TUPLE}. For BLOB topic, data will be organized as binary and encoded by BASE64. For TUPLE topic, data has fixed schema. The default value is "TUPLE" with a schema {STRING}.
	RecordType pulumi.StringPtrInput
	// The number of shards this topic contains. The permitted range of values is [1, 10]. The default value is 1.
	ShardCount pulumi.IntPtrInput
}

The set of arguments for constructing a Topic resource.

func (TopicArgs) ElementType

func (TopicArgs) ElementType() reflect.Type

type TopicState

type TopicState struct {
	// Comment of the datahub topic. It cannot be longer than 255 characters.
	Comment pulumi.StringPtrInput
	// Create time of the datahub topic. It is a human-readable string rather than 64-bits UTC.
	CreateTime pulumi.StringPtrInput
	// Last modify time of the datahub topic. It is the same as *create_time* at the beginning. It is also a human-readable string rather than 64-bits UTC.
	LastModifyTime pulumi.StringPtrInput
	// How many days this topic lives. The permitted range of values is [1, 7]. The default value is 3.
	LifeCycle pulumi.IntPtrInput
	// The name of the datahub topic. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.
	Name pulumi.StringPtrInput
	// The name of the datahub project that this topic belongs to. It is case-insensitive.
	ProjectName pulumi.StringPtrInput
	// Schema of this topic, required only for TUPLE topic. Supported data types (case-insensitive) are:
	// - BIGINT
	// - STRING
	// - BOOLEAN
	// - DOUBLE
	// - TIMESTAMP
	RecordSchema pulumi.MapInput
	// The type of this topic. Its value must be one of {BLOB, TUPLE}. For BLOB topic, data will be organized as binary and encoded by BASE64. For TUPLE topic, data has fixed schema. The default value is "TUPLE" with a schema {STRING}.
	RecordType pulumi.StringPtrInput
	// The number of shards this topic contains. The permitted range of values is [1, 10]. The default value is 1.
	ShardCount pulumi.IntPtrInput
}

func (TopicState) ElementType

func (TopicState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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