Documentation
¶
Index ¶
- func PkgVersion() (semver.Version, error)
- type GetServiceArgs
- type GetServiceOutputArgs
- type GetServiceResult
- type GetServiceResultOutput
- func (GetServiceResultOutput) ElementType() reflect.Type
- func (o GetServiceResultOutput) Enable() pulumi.StringPtrOutput
- func (o GetServiceResultOutput) Id() pulumi.StringOutput
- func (o GetServiceResultOutput) Status() pulumi.StringOutput
- func (o GetServiceResultOutput) ToGetServiceResultOutput() GetServiceResultOutput
- func (o GetServiceResultOutput) ToGetServiceResultOutputWithContext(ctx context.Context) GetServiceResultOutput
- type Project
- type ProjectArgs
- type ProjectArray
- type ProjectArrayInput
- type ProjectArrayOutput
- type ProjectInput
- type ProjectMap
- type ProjectMapInput
- type ProjectMapOutput
- type ProjectOutput
- func (o ProjectOutput) Comment() pulumi.StringPtrOutput
- func (o ProjectOutput) CreateTime() pulumi.StringOutput
- func (ProjectOutput) ElementType() reflect.Type
- func (o ProjectOutput) LastModifyTime() pulumi.StringOutput
- func (o ProjectOutput) Name() pulumi.StringOutput
- func (o ProjectOutput) ToProjectOutput() ProjectOutput
- func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput
- type ProjectState
- type Subscription
- type SubscriptionArgs
- type SubscriptionArray
- type SubscriptionArrayInput
- type SubscriptionArrayOutput
- func (SubscriptionArrayOutput) ElementType() reflect.Type
- func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput
- func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput
- func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput
- type SubscriptionInput
- type SubscriptionMap
- type SubscriptionMapInput
- type SubscriptionMapOutput
- func (SubscriptionMapOutput) ElementType() reflect.Type
- func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput
- func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput
- func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput
- type SubscriptionOutput
- func (o SubscriptionOutput) Comment() pulumi.StringPtrOutput
- func (o SubscriptionOutput) CreateTime() pulumi.StringOutput
- func (SubscriptionOutput) ElementType() reflect.Type
- func (o SubscriptionOutput) LastModifyTime() pulumi.StringOutput
- func (o SubscriptionOutput) ProjectName() pulumi.StringOutput
- func (o SubscriptionOutput) SubId() pulumi.StringOutput
- func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput
- func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
- func (o SubscriptionOutput) TopicName() pulumi.StringOutput
- type SubscriptionState
- type Topic
- type TopicArgs
- type TopicArray
- type TopicArrayInput
- type TopicArrayOutput
- type TopicInput
- type TopicMap
- type TopicMapInput
- type TopicMapOutput
- type TopicOutput
- func (o TopicOutput) Comment() pulumi.StringPtrOutput
- func (o TopicOutput) CreateTime() pulumi.StringOutput
- func (TopicOutput) ElementType() reflect.Type
- func (o TopicOutput) LastModifyTime() pulumi.StringOutput
- func (o TopicOutput) LifeCycle() pulumi.IntPtrOutput
- func (o TopicOutput) Name() pulumi.StringOutput
- func (o TopicOutput) ProjectName() pulumi.StringOutput
- func (o TopicOutput) RecordSchema() pulumi.MapOutput
- func (o TopicOutput) RecordType() pulumi.StringPtrOutput
- func (o TopicOutput) ShardCount() pulumi.IntPtrOutput
- func (o TopicOutput) ToTopicOutput() TopicOutput
- func (o TopicOutput) ToTopicOutputWithContext(ctx context.Context) TopicOutput
- type TopicState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶ added in v0.0.1
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 GetServiceArgs ¶
type GetServiceArgs struct { // Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: `On` or `Off`. Default to `Off`. Enable *string `pulumi:"enable"` }
A collection of arguments for invoking getService.
type GetServiceOutputArgs ¶
type GetServiceOutputArgs struct { // Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: `On` or `Off`. Default to `Off`. Enable pulumi.StringPtrInput `pulumi:"enable"` }
A collection of arguments for invoking getService.
func (GetServiceOutputArgs) ElementType ¶
func (GetServiceOutputArgs) ElementType() reflect.Type
type GetServiceResult ¶
type GetServiceResult struct { Enable *string `pulumi:"enable"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The current service enable status. Status string `pulumi:"status"` }
A collection of values returned by getService.
func GetService ¶
func GetService(ctx *pulumi.Context, args *GetServiceArgs, opts ...pulumi.InvokeOption) (*GetServiceResult, error)
Using this data source can open DataHub service automatically. If the service has been opened, it will return opened.
For information about DataHub and how to use it, see [What is DataHub](https://help.aliyun.com/product/53345.html).
> **NOTE:** Available in v1.111.0+
> **NOTE:** The DataHub service is not support in the international site.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/datahub" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/datahub"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := datahub.GetService(ctx, &datahub.GetServiceArgs{ Enable: pulumi.StringRef("On"), }, nil) if err != nil { return err } return nil }) }
```
type GetServiceResultOutput ¶
type GetServiceResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getService.
func GetServiceOutput ¶
func GetServiceOutput(ctx *pulumi.Context, args GetServiceOutputArgs, opts ...pulumi.InvokeOption) GetServiceResultOutput
func (GetServiceResultOutput) ElementType ¶
func (GetServiceResultOutput) ElementType() reflect.Type
func (GetServiceResultOutput) Enable ¶
func (o GetServiceResultOutput) Enable() pulumi.StringPtrOutput
func (GetServiceResultOutput) Id ¶
func (o GetServiceResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetServiceResultOutput) Status ¶
func (o GetServiceResultOutput) Status() pulumi.StringOutput
The current service enable status.
func (GetServiceResultOutput) ToGetServiceResultOutput ¶
func (o GetServiceResultOutput) ToGetServiceResultOutput() GetServiceResultOutput
func (GetServiceResultOutput) ToGetServiceResultOutputWithContext ¶
func (o GetServiceResultOutput) ToGetServiceResultOutputWithContext(ctx context.Context) GetServiceResultOutput
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/sdk/v3/go/pulumi" "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/datahub"
)
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 }) }
```
## Import
Datahub project can be imported using the *name* or ID, e.g.
```sh
$ pulumi import alicloud:datahub/project:Project example tf_datahub_project
```
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.
func (*Project) ElementType ¶
func (*Project) ToProjectOutput ¶
func (i *Project) ToProjectOutput() ProjectOutput
func (*Project) ToProjectOutputWithContext ¶
func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput
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 ProjectArray ¶
type ProjectArray []ProjectInput
func (ProjectArray) ElementType ¶
func (ProjectArray) ElementType() reflect.Type
func (ProjectArray) ToProjectArrayOutput ¶
func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput
func (ProjectArray) ToProjectArrayOutputWithContext ¶
func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput
type ProjectArrayInput ¶
type ProjectArrayInput interface { pulumi.Input ToProjectArrayOutput() ProjectArrayOutput ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput }
ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values. You can construct a concrete instance of `ProjectArrayInput` via:
ProjectArray{ ProjectArgs{...} }
type ProjectArrayOutput ¶
type ProjectArrayOutput struct{ *pulumi.OutputState }
func (ProjectArrayOutput) ElementType ¶
func (ProjectArrayOutput) ElementType() reflect.Type
func (ProjectArrayOutput) Index ¶
func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput
func (ProjectArrayOutput) ToProjectArrayOutput ¶
func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput
func (ProjectArrayOutput) ToProjectArrayOutputWithContext ¶
func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput
type ProjectInput ¶
type ProjectInput interface { pulumi.Input ToProjectOutput() ProjectOutput ToProjectOutputWithContext(ctx context.Context) ProjectOutput }
type ProjectMap ¶
type ProjectMap map[string]ProjectInput
func (ProjectMap) ElementType ¶
func (ProjectMap) ElementType() reflect.Type
func (ProjectMap) ToProjectMapOutput ¶
func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput
func (ProjectMap) ToProjectMapOutputWithContext ¶
func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput
type ProjectMapInput ¶
type ProjectMapInput interface { pulumi.Input ToProjectMapOutput() ProjectMapOutput ToProjectMapOutputWithContext(context.Context) ProjectMapOutput }
ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values. You can construct a concrete instance of `ProjectMapInput` via:
ProjectMap{ "key": ProjectArgs{...} }
type ProjectMapOutput ¶
type ProjectMapOutput struct{ *pulumi.OutputState }
func (ProjectMapOutput) ElementType ¶
func (ProjectMapOutput) ElementType() reflect.Type
func (ProjectMapOutput) MapIndex ¶
func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput
func (ProjectMapOutput) ToProjectMapOutput ¶
func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput
func (ProjectMapOutput) ToProjectMapOutputWithContext ¶
func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput
type ProjectOutput ¶
type ProjectOutput struct{ *pulumi.OutputState }
func (ProjectOutput) Comment ¶
func (o ProjectOutput) Comment() pulumi.StringPtrOutput
Comment of the datahub project. It cannot be longer than 255 characters.
func (ProjectOutput) CreateTime ¶
func (o ProjectOutput) CreateTime() pulumi.StringOutput
Create time of the datahub project. It is a human-readable string rather than 64-bits UTC.
func (ProjectOutput) ElementType ¶
func (ProjectOutput) ElementType() reflect.Type
func (ProjectOutput) LastModifyTime ¶
func (o ProjectOutput) LastModifyTime() pulumi.StringOutput
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.
func (ProjectOutput) Name ¶
func (o ProjectOutput) Name() pulumi.StringOutput
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.
func (ProjectOutput) ToProjectOutput ¶
func (o ProjectOutput) ToProjectOutput() ProjectOutput
func (ProjectOutput) ToProjectOutputWithContext ¶
func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput
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 subscription, 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/sdk/v3/go/pulumi" "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/datahub"
)
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 }) }
```
## Import
Datahub subscription can be imported using the ID, e.g.
```sh
$ pulumi import alicloud:datahub/subscription:Subscription example tf_datahub_project:tf_datahub_topic:1539073399567UgCzY
```
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.
func (*Subscription) ElementType ¶
func (*Subscription) ElementType() reflect.Type
func (*Subscription) ToSubscriptionOutput ¶
func (i *Subscription) ToSubscriptionOutput() SubscriptionOutput
func (*Subscription) ToSubscriptionOutputWithContext ¶
func (i *Subscription) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
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 SubscriptionArray ¶
type SubscriptionArray []SubscriptionInput
func (SubscriptionArray) ElementType ¶
func (SubscriptionArray) ElementType() reflect.Type
func (SubscriptionArray) ToSubscriptionArrayOutput ¶
func (i SubscriptionArray) ToSubscriptionArrayOutput() SubscriptionArrayOutput
func (SubscriptionArray) ToSubscriptionArrayOutputWithContext ¶
func (i SubscriptionArray) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput
type SubscriptionArrayInput ¶
type SubscriptionArrayInput interface { pulumi.Input ToSubscriptionArrayOutput() SubscriptionArrayOutput ToSubscriptionArrayOutputWithContext(context.Context) SubscriptionArrayOutput }
SubscriptionArrayInput is an input type that accepts SubscriptionArray and SubscriptionArrayOutput values. You can construct a concrete instance of `SubscriptionArrayInput` via:
SubscriptionArray{ SubscriptionArgs{...} }
type SubscriptionArrayOutput ¶
type SubscriptionArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionArrayOutput) ElementType ¶
func (SubscriptionArrayOutput) ElementType() reflect.Type
func (SubscriptionArrayOutput) Index ¶
func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput
func (SubscriptionArrayOutput) ToSubscriptionArrayOutput ¶
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput
func (SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext ¶
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput
type SubscriptionInput ¶
type SubscriptionInput interface { pulumi.Input ToSubscriptionOutput() SubscriptionOutput ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput }
type SubscriptionMap ¶
type SubscriptionMap map[string]SubscriptionInput
func (SubscriptionMap) ElementType ¶
func (SubscriptionMap) ElementType() reflect.Type
func (SubscriptionMap) ToSubscriptionMapOutput ¶
func (i SubscriptionMap) ToSubscriptionMapOutput() SubscriptionMapOutput
func (SubscriptionMap) ToSubscriptionMapOutputWithContext ¶
func (i SubscriptionMap) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput
type SubscriptionMapInput ¶
type SubscriptionMapInput interface { pulumi.Input ToSubscriptionMapOutput() SubscriptionMapOutput ToSubscriptionMapOutputWithContext(context.Context) SubscriptionMapOutput }
SubscriptionMapInput is an input type that accepts SubscriptionMap and SubscriptionMapOutput values. You can construct a concrete instance of `SubscriptionMapInput` via:
SubscriptionMap{ "key": SubscriptionArgs{...} }
type SubscriptionMapOutput ¶
type SubscriptionMapOutput struct{ *pulumi.OutputState }
func (SubscriptionMapOutput) ElementType ¶
func (SubscriptionMapOutput) ElementType() reflect.Type
func (SubscriptionMapOutput) MapIndex ¶
func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput
func (SubscriptionMapOutput) ToSubscriptionMapOutput ¶
func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput
func (SubscriptionMapOutput) ToSubscriptionMapOutputWithContext ¶
func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput
type SubscriptionOutput ¶
type SubscriptionOutput struct{ *pulumi.OutputState }
func (SubscriptionOutput) Comment ¶
func (o SubscriptionOutput) Comment() pulumi.StringPtrOutput
Comment of the datahub subscription. It cannot be longer than 255 characters.
func (SubscriptionOutput) CreateTime ¶
func (o SubscriptionOutput) CreateTime() pulumi.StringOutput
Create time of the datahub subscription. It is a human-readable string rather than 64-bits UTC.
func (SubscriptionOutput) ElementType ¶
func (SubscriptionOutput) ElementType() reflect.Type
func (SubscriptionOutput) LastModifyTime ¶
func (o SubscriptionOutput) LastModifyTime() pulumi.StringOutput
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.
func (SubscriptionOutput) ProjectName ¶
func (o SubscriptionOutput) ProjectName() pulumi.StringOutput
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.
func (SubscriptionOutput) SubId ¶
func (o SubscriptionOutput) SubId() pulumi.StringOutput
The identidy of the subscription, generate from server side.
func (SubscriptionOutput) ToSubscriptionOutput ¶
func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput
func (SubscriptionOutput) ToSubscriptionOutputWithContext ¶
func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
func (SubscriptionOutput) TopicName ¶
func (o SubscriptionOutput) TopicName() pulumi.StringOutput
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.
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 subscription, 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
```go package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/datahub"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := datahub.NewTopic(ctx, "example", &datahub.TopicArgs{ Comment: pulumi.String("created by terraform"), LifeCycle: pulumi.Int(7), ProjectName: pulumi.String("tf_datahub_project"), RecordType: pulumi.String("BLOB"), ShardCount: pulumi.Int(3), }) if err != nil { return err } return nil }) }
``` - Tuple Topic
```go package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/datahub"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := datahub.NewTopic(ctx, "example", &datahub.TopicArgs{ Comment: pulumi.String("created by terraform"), LifeCycle: pulumi.Int(7), ProjectName: pulumi.String("tf_datahub_project"), RecordSchema: pulumi.AnyMap{ "bigint_field": pulumi.Any("BIGINT"), "boolean_field": pulumi.Any("BOOLEAN"), "double_field": pulumi.Any("DOUBLE"), "string_field": pulumi.Any("STRING"), "timestamp_field": pulumi.Any("TIMESTAMP"), }, RecordType: pulumi.String("TUPLE"), ShardCount: pulumi.Int(3), }) if err != nil { return err } return nil }) }
```
## Import
Datahub topic can be imported using the ID, e.g.
```sh
$ pulumi import alicloud:datahub/topic:Topic example tf_datahub_project:tf_datahub_topic
```
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.
func (*Topic) ElementType ¶
func (*Topic) ToTopicOutput ¶
func (i *Topic) ToTopicOutput() TopicOutput
func (*Topic) ToTopicOutputWithContext ¶
func (i *Topic) ToTopicOutputWithContext(ctx context.Context) TopicOutput
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 ¶
type TopicArray ¶
type TopicArray []TopicInput
func (TopicArray) ElementType ¶
func (TopicArray) ElementType() reflect.Type
func (TopicArray) ToTopicArrayOutput ¶
func (i TopicArray) ToTopicArrayOutput() TopicArrayOutput
func (TopicArray) ToTopicArrayOutputWithContext ¶
func (i TopicArray) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput
type TopicArrayInput ¶
type TopicArrayInput interface { pulumi.Input ToTopicArrayOutput() TopicArrayOutput ToTopicArrayOutputWithContext(context.Context) TopicArrayOutput }
TopicArrayInput is an input type that accepts TopicArray and TopicArrayOutput values. You can construct a concrete instance of `TopicArrayInput` via:
TopicArray{ TopicArgs{...} }
type TopicArrayOutput ¶
type TopicArrayOutput struct{ *pulumi.OutputState }
func (TopicArrayOutput) ElementType ¶
func (TopicArrayOutput) ElementType() reflect.Type
func (TopicArrayOutput) Index ¶
func (o TopicArrayOutput) Index(i pulumi.IntInput) TopicOutput
func (TopicArrayOutput) ToTopicArrayOutput ¶
func (o TopicArrayOutput) ToTopicArrayOutput() TopicArrayOutput
func (TopicArrayOutput) ToTopicArrayOutputWithContext ¶
func (o TopicArrayOutput) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput
type TopicInput ¶
type TopicInput interface { pulumi.Input ToTopicOutput() TopicOutput ToTopicOutputWithContext(ctx context.Context) TopicOutput }
type TopicMap ¶
type TopicMap map[string]TopicInput
func (TopicMap) ElementType ¶
func (TopicMap) ToTopicMapOutput ¶
func (i TopicMap) ToTopicMapOutput() TopicMapOutput
func (TopicMap) ToTopicMapOutputWithContext ¶
func (i TopicMap) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput
type TopicMapInput ¶
type TopicMapInput interface { pulumi.Input ToTopicMapOutput() TopicMapOutput ToTopicMapOutputWithContext(context.Context) TopicMapOutput }
TopicMapInput is an input type that accepts TopicMap and TopicMapOutput values. You can construct a concrete instance of `TopicMapInput` via:
TopicMap{ "key": TopicArgs{...} }
type TopicMapOutput ¶
type TopicMapOutput struct{ *pulumi.OutputState }
func (TopicMapOutput) ElementType ¶
func (TopicMapOutput) ElementType() reflect.Type
func (TopicMapOutput) MapIndex ¶
func (o TopicMapOutput) MapIndex(k pulumi.StringInput) TopicOutput
func (TopicMapOutput) ToTopicMapOutput ¶
func (o TopicMapOutput) ToTopicMapOutput() TopicMapOutput
func (TopicMapOutput) ToTopicMapOutputWithContext ¶
func (o TopicMapOutput) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput
type TopicOutput ¶
type TopicOutput struct{ *pulumi.OutputState }
func (TopicOutput) Comment ¶
func (o TopicOutput) Comment() pulumi.StringPtrOutput
Comment of the datahub topic. It cannot be longer than 255 characters.
func (TopicOutput) CreateTime ¶
func (o TopicOutput) CreateTime() pulumi.StringOutput
Create time of the datahub topic. It is a human-readable string rather than 64-bits UTC.
func (TopicOutput) ElementType ¶
func (TopicOutput) ElementType() reflect.Type
func (TopicOutput) LastModifyTime ¶
func (o TopicOutput) LastModifyTime() pulumi.StringOutput
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.
func (TopicOutput) LifeCycle ¶
func (o TopicOutput) LifeCycle() pulumi.IntPtrOutput
How many days this topic lives. The permitted range of values is [1, 7]. The default value is 3.
func (TopicOutput) Name ¶
func (o TopicOutput) Name() pulumi.StringOutput
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.
func (TopicOutput) ProjectName ¶
func (o TopicOutput) ProjectName() pulumi.StringOutput
The name of the datahub project that this topic belongs to. It is case-insensitive.
func (TopicOutput) RecordSchema ¶
func (o TopicOutput) RecordSchema() pulumi.MapOutput
Schema of this topic, required only for TUPLE topic. Supported data types (case-insensitive) are: - BIGINT - STRING - BOOLEAN - DOUBLE - TIMESTAMP
func (TopicOutput) RecordType ¶
func (o TopicOutput) RecordType() pulumi.StringPtrOutput
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}.
func (TopicOutput) ShardCount ¶
func (o TopicOutput) ShardCount() pulumi.IntPtrOutput
The number of shards this topic contains. The permitted range of values is [1, 10]. The default value is 1.
func (TopicOutput) ToTopicOutput ¶
func (o TopicOutput) ToTopicOutput() TopicOutput
func (TopicOutput) ToTopicOutputWithContext ¶
func (o TopicOutput) ToTopicOutputWithContext(ctx context.Context) TopicOutput
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