github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ivs/getStreamKey.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 ivs 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 // Data source for managing an AWS IVS (Interactive Video) Stream Key. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ivs" 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 := ivs.GetStreamKey(ctx, &ivs.GetStreamKeyArgs{ 34 // ChannelArn: "arn:aws:ivs:us-west-2:326937407773:channel/0Y1lcs4U7jk5", 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func GetStreamKey(ctx *pulumi.Context, args *GetStreamKeyArgs, opts ...pulumi.InvokeOption) (*GetStreamKeyResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv GetStreamKeyResult 48 err := ctx.Invoke("aws:ivs/getStreamKey:getStreamKey", 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 getStreamKey. 56 type GetStreamKeyArgs struct { 57 // ARN of the Channel. 58 ChannelArn string `pulumi:"channelArn"` 59 // Map of tags assigned to the resource. 60 Tags map[string]string `pulumi:"tags"` 61 } 62 63 // A collection of values returned by getStreamKey. 64 type GetStreamKeyResult struct { 65 // ARN of the Stream Key. 66 Arn string `pulumi:"arn"` 67 ChannelArn string `pulumi:"channelArn"` 68 // The provider-assigned unique ID for this managed resource. 69 Id string `pulumi:"id"` 70 // Map of tags assigned to the resource. 71 Tags map[string]string `pulumi:"tags"` 72 // Stream Key value. 73 Value string `pulumi:"value"` 74 } 75 76 func GetStreamKeyOutput(ctx *pulumi.Context, args GetStreamKeyOutputArgs, opts ...pulumi.InvokeOption) GetStreamKeyResultOutput { 77 return pulumi.ToOutputWithContext(context.Background(), args). 78 ApplyT(func(v interface{}) (GetStreamKeyResult, error) { 79 args := v.(GetStreamKeyArgs) 80 r, err := GetStreamKey(ctx, &args, opts...) 81 var s GetStreamKeyResult 82 if r != nil { 83 s = *r 84 } 85 return s, err 86 }).(GetStreamKeyResultOutput) 87 } 88 89 // A collection of arguments for invoking getStreamKey. 90 type GetStreamKeyOutputArgs struct { 91 // ARN of the Channel. 92 ChannelArn pulumi.StringInput `pulumi:"channelArn"` 93 // Map of tags assigned to the resource. 94 Tags pulumi.StringMapInput `pulumi:"tags"` 95 } 96 97 func (GetStreamKeyOutputArgs) ElementType() reflect.Type { 98 return reflect.TypeOf((*GetStreamKeyArgs)(nil)).Elem() 99 } 100 101 // A collection of values returned by getStreamKey. 102 type GetStreamKeyResultOutput struct{ *pulumi.OutputState } 103 104 func (GetStreamKeyResultOutput) ElementType() reflect.Type { 105 return reflect.TypeOf((*GetStreamKeyResult)(nil)).Elem() 106 } 107 108 func (o GetStreamKeyResultOutput) ToGetStreamKeyResultOutput() GetStreamKeyResultOutput { 109 return o 110 } 111 112 func (o GetStreamKeyResultOutput) ToGetStreamKeyResultOutputWithContext(ctx context.Context) GetStreamKeyResultOutput { 113 return o 114 } 115 116 // ARN of the Stream Key. 117 func (o GetStreamKeyResultOutput) Arn() pulumi.StringOutput { 118 return o.ApplyT(func(v GetStreamKeyResult) string { return v.Arn }).(pulumi.StringOutput) 119 } 120 121 func (o GetStreamKeyResultOutput) ChannelArn() pulumi.StringOutput { 122 return o.ApplyT(func(v GetStreamKeyResult) string { return v.ChannelArn }).(pulumi.StringOutput) 123 } 124 125 // The provider-assigned unique ID for this managed resource. 126 func (o GetStreamKeyResultOutput) Id() pulumi.StringOutput { 127 return o.ApplyT(func(v GetStreamKeyResult) string { return v.Id }).(pulumi.StringOutput) 128 } 129 130 // Map of tags assigned to the resource. 131 func (o GetStreamKeyResultOutput) Tags() pulumi.StringMapOutput { 132 return o.ApplyT(func(v GetStreamKeyResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 133 } 134 135 // Stream Key value. 136 func (o GetStreamKeyResultOutput) Value() pulumi.StringOutput { 137 return o.ApplyT(func(v GetStreamKeyResult) string { return v.Value }).(pulumi.StringOutput) 138 } 139 140 func init() { 141 pulumi.RegisterOutputType(GetStreamKeyResultOutput{}) 142 }