-
Notifications
You must be signed in to change notification settings - Fork 17
/
getEventBus.go
97 lines (80 loc) · 3.31 KB
/
getEventBus.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package events
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource type definition for AWS::Events::EventBus
func LookupEventBus(ctx *pulumi.Context, args *LookupEventBusArgs, opts ...pulumi.InvokeOption) (*LookupEventBusResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupEventBusResult
err := ctx.Invoke("aws-native:events:getEventBus", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupEventBusArgs struct {
// The name of the event bus.
Name string `pulumi:"name"`
}
type LookupEventBusResult struct {
// The Amazon Resource Name (ARN) for the event bus.
Arn *string `pulumi:"arn"`
// A JSON string that describes the permission policy statement for the event bus.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Events::EventBus` for more information about the expected schema for this property.
Policy interface{} `pulumi:"policy"`
// Any tags assigned to the event bus.
Tags []aws.Tag `pulumi:"tags"`
}
func LookupEventBusOutput(ctx *pulumi.Context, args LookupEventBusOutputArgs, opts ...pulumi.InvokeOption) LookupEventBusResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupEventBusResult, error) {
args := v.(LookupEventBusArgs)
r, err := LookupEventBus(ctx, &args, opts...)
var s LookupEventBusResult
if r != nil {
s = *r
}
return s, err
}).(LookupEventBusResultOutput)
}
type LookupEventBusOutputArgs struct {
// The name of the event bus.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupEventBusOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEventBusArgs)(nil)).Elem()
}
type LookupEventBusResultOutput struct{ *pulumi.OutputState }
func (LookupEventBusResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEventBusResult)(nil)).Elem()
}
func (o LookupEventBusResultOutput) ToLookupEventBusResultOutput() LookupEventBusResultOutput {
return o
}
func (o LookupEventBusResultOutput) ToLookupEventBusResultOutputWithContext(ctx context.Context) LookupEventBusResultOutput {
return o
}
// The Amazon Resource Name (ARN) for the event bus.
func (o LookupEventBusResultOutput) Arn() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupEventBusResult) *string { return v.Arn }).(pulumi.StringPtrOutput)
}
// A JSON string that describes the permission policy statement for the event bus.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Events::EventBus` for more information about the expected schema for this property.
func (o LookupEventBusResultOutput) Policy() pulumi.AnyOutput {
return o.ApplyT(func(v LookupEventBusResult) interface{} { return v.Policy }).(pulumi.AnyOutput)
}
// Any tags assigned to the event bus.
func (o LookupEventBusResultOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v LookupEventBusResult) []aws.Tag { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupEventBusResultOutput{})
}