Documentation ¶
Index ¶
- func PkgVersion() (semver.Version, error)
- type Group
- type GroupArgs
- type GroupArray
- type GroupArrayInput
- type GroupArrayOutput
- type GroupInput
- type GroupMap
- type GroupMapInput
- type GroupMapOutput
- type GroupOutput
- func (GroupOutput) ElementType() reflect.Type
- func (o GroupOutput) GroupName() pulumi.StringOutput
- func (o GroupOutput) Region() pulumi.StringOutput
- func (o GroupOutput) ToGroupOutput() GroupOutput
- func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput
- func (o GroupOutput) TtlInDays() pulumi.IntOutput
- type GroupState
- type Stream
- type StreamArgs
- type StreamArray
- type StreamArrayInput
- type StreamArrayOutput
- type StreamInput
- type StreamMap
- type StreamMapInput
- type StreamMapOutput
- type StreamOutput
- func (StreamOutput) ElementType() reflect.Type
- func (o StreamOutput) FilterCount() pulumi.IntOutput
- func (o StreamOutput) GroupId() pulumi.StringOutput
- func (o StreamOutput) Region() pulumi.StringOutput
- func (o StreamOutput) StreamName() pulumi.StringOutput
- func (o StreamOutput) ToStreamOutput() StreamOutput
- func (o StreamOutput) ToStreamOutputWithContext(ctx context.Context) StreamOutput
- type StreamState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶ added in v0.0.2
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 Group ¶
type Group struct { pulumi.CustomResourceState // Specifies the log group name. Changing this parameter will create a new // resource. GroupName pulumi.StringOutput `pulumi:"groupName"` // The region in which to create the log group resource. If omitted, the // provider-level region will be used. Changing this creates a new log group resource. Region pulumi.StringOutput `pulumi:"region"` // Specifies the log expiration time(days), value range: 1-30. TtlInDays pulumi.IntOutput `pulumi:"ttlInDays"` }
Manages a log group resource within HuaweiCloud.
## Example Usage ### create a log group
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Lts" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Lts.NewGroup(ctx, "logGroup1", &Lts.GroupArgs{ GroupName: pulumi.String("log_group1"), TtlInDays: pulumi.Int(1), }) if err != nil { return err } return nil }) }
```
## Import
Log group can be imported using the `id`, e.g.
```sh
$ pulumi import huaweicloud:Lts/group:Group group_1 7117d38e-4c8f-4624-a505-bd96b97d024c
```
func GetGroup ¶
func GetGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error)
GetGroup gets an existing Group 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 NewGroup ¶
func NewGroup(ctx *pulumi.Context, name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error)
NewGroup registers a new resource with the given unique name, arguments, and options.
func (*Group) ElementType ¶
func (*Group) ToGroupOutput ¶
func (i *Group) ToGroupOutput() GroupOutput
func (*Group) ToGroupOutputWithContext ¶
func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput
type GroupArgs ¶
type GroupArgs struct { // Specifies the log group name. Changing this parameter will create a new // resource. GroupName pulumi.StringInput // The region in which to create the log group resource. If omitted, the // provider-level region will be used. Changing this creates a new log group resource. Region pulumi.StringPtrInput // Specifies the log expiration time(days), value range: 1-30. TtlInDays pulumi.IntInput }
The set of arguments for constructing a Group resource.
func (GroupArgs) ElementType ¶
type GroupArray ¶
type GroupArray []GroupInput
func (GroupArray) ElementType ¶
func (GroupArray) ElementType() reflect.Type
func (GroupArray) ToGroupArrayOutput ¶
func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput
func (GroupArray) ToGroupArrayOutputWithContext ¶
func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput
type GroupArrayInput ¶
type GroupArrayInput interface { pulumi.Input ToGroupArrayOutput() GroupArrayOutput ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput }
GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values. You can construct a concrete instance of `GroupArrayInput` via:
GroupArray{ GroupArgs{...} }
type GroupArrayOutput ¶
type GroupArrayOutput struct{ *pulumi.OutputState }
func (GroupArrayOutput) ElementType ¶
func (GroupArrayOutput) ElementType() reflect.Type
func (GroupArrayOutput) Index ¶
func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput
func (GroupArrayOutput) ToGroupArrayOutput ¶
func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput
func (GroupArrayOutput) ToGroupArrayOutputWithContext ¶
func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput
type GroupInput ¶
type GroupInput interface { pulumi.Input ToGroupOutput() GroupOutput ToGroupOutputWithContext(ctx context.Context) GroupOutput }
type GroupMap ¶
type GroupMap map[string]GroupInput
func (GroupMap) ElementType ¶
func (GroupMap) ToGroupMapOutput ¶
func (i GroupMap) ToGroupMapOutput() GroupMapOutput
func (GroupMap) ToGroupMapOutputWithContext ¶
func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput
type GroupMapInput ¶
type GroupMapInput interface { pulumi.Input ToGroupMapOutput() GroupMapOutput ToGroupMapOutputWithContext(context.Context) GroupMapOutput }
GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values. You can construct a concrete instance of `GroupMapInput` via:
GroupMap{ "key": GroupArgs{...} }
type GroupMapOutput ¶
type GroupMapOutput struct{ *pulumi.OutputState }
func (GroupMapOutput) ElementType ¶
func (GroupMapOutput) ElementType() reflect.Type
func (GroupMapOutput) MapIndex ¶
func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput
func (GroupMapOutput) ToGroupMapOutput ¶
func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput
func (GroupMapOutput) ToGroupMapOutputWithContext ¶
func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput
type GroupOutput ¶
type GroupOutput struct{ *pulumi.OutputState }
func (GroupOutput) ElementType ¶
func (GroupOutput) ElementType() reflect.Type
func (GroupOutput) GroupName ¶
func (o GroupOutput) GroupName() pulumi.StringOutput
Specifies the log group name. Changing this parameter will create a new resource.
func (GroupOutput) Region ¶
func (o GroupOutput) Region() pulumi.StringOutput
The region in which to create the log group resource. If omitted, the provider-level region will be used. Changing this creates a new log group resource.
func (GroupOutput) ToGroupOutput ¶
func (o GroupOutput) ToGroupOutput() GroupOutput
func (GroupOutput) ToGroupOutputWithContext ¶
func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput
func (GroupOutput) TtlInDays ¶
func (o GroupOutput) TtlInDays() pulumi.IntOutput
Specifies the log expiration time(days), value range: 1-30.
type GroupState ¶
type GroupState struct { // Specifies the log group name. Changing this parameter will create a new // resource. GroupName pulumi.StringPtrInput // The region in which to create the log group resource. If omitted, the // provider-level region will be used. Changing this creates a new log group resource. Region pulumi.StringPtrInput // Specifies the log expiration time(days), value range: 1-30. TtlInDays pulumi.IntPtrInput }
func (GroupState) ElementType ¶
func (GroupState) ElementType() reflect.Type
type Stream ¶
type Stream struct { pulumi.CustomResourceState // Number of log stream filters. FilterCount pulumi.IntOutput `pulumi:"filterCount"` // Specifies the ID of a created log group. Changing this parameter will create // a new resource. GroupId pulumi.StringOutput `pulumi:"groupId"` // The region in which to create the log stream resource. If omitted, the // provider-level region will be used. Changing this creates a new log stream resource. Region pulumi.StringOutput `pulumi:"region"` // Specifies the log stream name. Changing this parameter will create a new // resource. StreamName pulumi.StringOutput `pulumi:"streamName"` }
Manage a log stream resource within HuaweiCloud.
## Example Usage ### create a log stream
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Lts" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { testGroup, err := Lts.NewGroup(ctx, "testGroup", &Lts.GroupArgs{ GroupName: pulumi.String("test_group"), TtlInDays: pulumi.Int(1), }) if err != nil { return err } _, err = Lts.NewStream(ctx, "testStream", &Lts.StreamArgs{ GroupId: testGroup.ID(), StreamName: pulumi.String("testacc_stream"), }) if err != nil { return err } return nil }) }
```
## Import
Log stream can be imported using the lts group ID and stream ID separated by a slash, e.g.
```sh
$ pulumi import huaweicloud:Lts/stream:Stream stream_1 393f2bfd-2244-11ea-adb7-286ed488c87f/72855918-20b1-11ea-80e0-286ed488c880
```
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) ToStreamOutput ¶
func (i *Stream) ToStreamOutput() StreamOutput
func (*Stream) ToStreamOutputWithContext ¶
func (i *Stream) ToStreamOutputWithContext(ctx context.Context) StreamOutput
type StreamArgs ¶
type StreamArgs struct { // Specifies the ID of a created log group. Changing this parameter will create // a new resource. GroupId pulumi.StringInput // The region in which to create the log stream resource. If omitted, the // provider-level region will be used. Changing this creates a new log stream resource. Region pulumi.StringPtrInput // Specifies the log stream name. Changing this parameter will create a new // resource. StreamName pulumi.StringInput }
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 (o StreamArrayOutput) Index(i pulumi.IntInput) StreamOutput
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) 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 (o StreamMapOutput) MapIndex(k pulumi.StringInput) StreamOutput
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) ElementType ¶
func (StreamOutput) ElementType() reflect.Type
func (StreamOutput) FilterCount ¶
func (o StreamOutput) FilterCount() pulumi.IntOutput
Number of log stream filters.
func (StreamOutput) GroupId ¶
func (o StreamOutput) GroupId() pulumi.StringOutput
Specifies the ID of a created log group. Changing this parameter will create a new resource.
func (StreamOutput) Region ¶
func (o StreamOutput) Region() pulumi.StringOutput
The region in which to create the log stream resource. If omitted, the provider-level region will be used. Changing this creates a new log stream resource.
func (StreamOutput) StreamName ¶
func (o StreamOutput) StreamName() pulumi.StringOutput
Specifies the log stream name. Changing this parameter will create a new resource.
func (StreamOutput) ToStreamOutput ¶
func (o StreamOutput) ToStreamOutput() StreamOutput
func (StreamOutput) ToStreamOutputWithContext ¶
func (o StreamOutput) ToStreamOutputWithContext(ctx context.Context) StreamOutput
type StreamState ¶
type StreamState struct { // Number of log stream filters. FilterCount pulumi.IntPtrInput // Specifies the ID of a created log group. Changing this parameter will create // a new resource. GroupId pulumi.StringPtrInput // The region in which to create the log stream resource. If omitted, the // provider-level region will be used. Changing this creates a new log stream resource. Region pulumi.StringPtrInput // Specifies the log stream name. Changing this parameter will create a new // resource. StreamName pulumi.StringPtrInput }
func (StreamState) ElementType ¶
func (StreamState) ElementType() reflect.Type