github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cloudwatch/getEventConnection.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package cloudwatch 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Use this data source to retrieve information about an EventBridge connection. 15 // 16 // > **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := cloudwatch.LookupEventConnection(ctx, &cloudwatch.LookupEventConnectionArgs{ 34 // Name: "test", 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func LookupEventConnection(ctx *pulumi.Context, args *LookupEventConnectionArgs, opts ...pulumi.InvokeOption) (*LookupEventConnectionResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv LookupEventConnectionResult 48 err := ctx.Invoke("aws:cloudwatch/getEventConnection:getEventConnection", args, &rv, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &rv, nil 53 } 54 55 // A collection of arguments for invoking getEventConnection. 56 type LookupEventConnectionArgs struct { 57 // Name of the connection. 58 Name string `pulumi:"name"` 59 } 60 61 // A collection of values returned by getEventConnection. 62 type LookupEventConnectionResult struct { 63 // ARN (Amazon Resource Name) for the connection. 64 Arn string `pulumi:"arn"` 65 // Type of authorization to use to connect. One of `API_KEY`,`BASIC`,`OAUTH_CLIENT_CREDENTIALS`. 66 AuthorizationType string `pulumi:"authorizationType"` 67 // The provider-assigned unique ID for this managed resource. 68 Id string `pulumi:"id"` 69 // Name of the connection. 70 Name string `pulumi:"name"` 71 // ARN (Amazon Resource Name) for the secret created from the authorization parameters specified for the connection. 72 SecretArn string `pulumi:"secretArn"` 73 } 74 75 func LookupEventConnectionOutput(ctx *pulumi.Context, args LookupEventConnectionOutputArgs, opts ...pulumi.InvokeOption) LookupEventConnectionResultOutput { 76 return pulumi.ToOutputWithContext(context.Background(), args). 77 ApplyT(func(v interface{}) (LookupEventConnectionResult, error) { 78 args := v.(LookupEventConnectionArgs) 79 r, err := LookupEventConnection(ctx, &args, opts...) 80 var s LookupEventConnectionResult 81 if r != nil { 82 s = *r 83 } 84 return s, err 85 }).(LookupEventConnectionResultOutput) 86 } 87 88 // A collection of arguments for invoking getEventConnection. 89 type LookupEventConnectionOutputArgs struct { 90 // Name of the connection. 91 Name pulumi.StringInput `pulumi:"name"` 92 } 93 94 func (LookupEventConnectionOutputArgs) ElementType() reflect.Type { 95 return reflect.TypeOf((*LookupEventConnectionArgs)(nil)).Elem() 96 } 97 98 // A collection of values returned by getEventConnection. 99 type LookupEventConnectionResultOutput struct{ *pulumi.OutputState } 100 101 func (LookupEventConnectionResultOutput) ElementType() reflect.Type { 102 return reflect.TypeOf((*LookupEventConnectionResult)(nil)).Elem() 103 } 104 105 func (o LookupEventConnectionResultOutput) ToLookupEventConnectionResultOutput() LookupEventConnectionResultOutput { 106 return o 107 } 108 109 func (o LookupEventConnectionResultOutput) ToLookupEventConnectionResultOutputWithContext(ctx context.Context) LookupEventConnectionResultOutput { 110 return o 111 } 112 113 // ARN (Amazon Resource Name) for the connection. 114 func (o LookupEventConnectionResultOutput) Arn() pulumi.StringOutput { 115 return o.ApplyT(func(v LookupEventConnectionResult) string { return v.Arn }).(pulumi.StringOutput) 116 } 117 118 // Type of authorization to use to connect. One of `API_KEY`,`BASIC`,`OAUTH_CLIENT_CREDENTIALS`. 119 func (o LookupEventConnectionResultOutput) AuthorizationType() pulumi.StringOutput { 120 return o.ApplyT(func(v LookupEventConnectionResult) string { return v.AuthorizationType }).(pulumi.StringOutput) 121 } 122 123 // The provider-assigned unique ID for this managed resource. 124 func (o LookupEventConnectionResultOutput) Id() pulumi.StringOutput { 125 return o.ApplyT(func(v LookupEventConnectionResult) string { return v.Id }).(pulumi.StringOutput) 126 } 127 128 // Name of the connection. 129 func (o LookupEventConnectionResultOutput) Name() pulumi.StringOutput { 130 return o.ApplyT(func(v LookupEventConnectionResult) string { return v.Name }).(pulumi.StringOutput) 131 } 132 133 // ARN (Amazon Resource Name) for the secret created from the authorization parameters specified for the connection. 134 func (o LookupEventConnectionResultOutput) SecretArn() pulumi.StringOutput { 135 return o.ApplyT(func(v LookupEventConnectionResult) string { return v.SecretArn }).(pulumi.StringOutput) 136 } 137 138 func init() { 139 pulumi.RegisterOutputType(LookupEventConnectionResultOutput{}) 140 }