github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ivs/playbackKeyPair.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 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Resource for managing an AWS IVS (Interactive Video) Playback Key Pair. 16 // 17 // ## Example Usage 18 // 19 // ### Basic Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ivs" 28 // "github.com/pulumi/pulumi-std/sdk/go/std" 29 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 30 // 31 // ) 32 // 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // invokeFile, err := std.File(ctx, &std.FileArgs{ 36 // Input: "./public-key.pem", 37 // }, nil) 38 // if err != nil { 39 // return err 40 // } 41 // _, err = ivs.NewPlaybackKeyPair(ctx, "example", &ivs.PlaybackKeyPairArgs{ 42 // PublicKey: invokeFile.Result, 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // return nil 48 // }) 49 // } 50 // 51 // ``` 52 // <!--End PulumiCodeChooser --> 53 // 54 // ## Import 55 // 56 // Using `pulumi import`, import IVS (Interactive Video) Playback Key Pair using the ARN. For example: 57 // 58 // ```sh 59 // $ pulumi import aws:ivs/playbackKeyPair:PlaybackKeyPair example arn:aws:ivs:us-west-2:326937407773:playback-key/KDJRJNQhiQzA 60 // ``` 61 type PlaybackKeyPair struct { 62 pulumi.CustomResourceState 63 64 // ARN of the Playback Key Pair. 65 Arn pulumi.StringOutput `pulumi:"arn"` 66 // Key-pair identifier. 67 Fingerprint pulumi.StringOutput `pulumi:"fingerprint"` 68 // Playback Key Pair name. 69 Name pulumi.StringOutput `pulumi:"name"` 70 // Public portion of a customer-generated key pair. Must be an ECDSA public key in PEM format. 71 // 72 // The following arguments are optional: 73 PublicKey pulumi.StringOutput `pulumi:"publicKey"` 74 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 75 Tags pulumi.StringMapOutput `pulumi:"tags"` 76 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 77 // 78 // Deprecated: Please use `tags` instead. 79 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 80 } 81 82 // NewPlaybackKeyPair registers a new resource with the given unique name, arguments, and options. 83 func NewPlaybackKeyPair(ctx *pulumi.Context, 84 name string, args *PlaybackKeyPairArgs, opts ...pulumi.ResourceOption) (*PlaybackKeyPair, error) { 85 if args == nil { 86 return nil, errors.New("missing one or more required arguments") 87 } 88 89 if args.PublicKey == nil { 90 return nil, errors.New("invalid value for required argument 'PublicKey'") 91 } 92 opts = internal.PkgResourceDefaultOpts(opts) 93 var resource PlaybackKeyPair 94 err := ctx.RegisterResource("aws:ivs/playbackKeyPair:PlaybackKeyPair", name, args, &resource, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return &resource, nil 99 } 100 101 // GetPlaybackKeyPair gets an existing PlaybackKeyPair resource's state with the given name, ID, and optional 102 // state properties that are used to uniquely qualify the lookup (nil if not required). 103 func GetPlaybackKeyPair(ctx *pulumi.Context, 104 name string, id pulumi.IDInput, state *PlaybackKeyPairState, opts ...pulumi.ResourceOption) (*PlaybackKeyPair, error) { 105 var resource PlaybackKeyPair 106 err := ctx.ReadResource("aws:ivs/playbackKeyPair:PlaybackKeyPair", name, id, state, &resource, opts...) 107 if err != nil { 108 return nil, err 109 } 110 return &resource, nil 111 } 112 113 // Input properties used for looking up and filtering PlaybackKeyPair resources. 114 type playbackKeyPairState struct { 115 // ARN of the Playback Key Pair. 116 Arn *string `pulumi:"arn"` 117 // Key-pair identifier. 118 Fingerprint *string `pulumi:"fingerprint"` 119 // Playback Key Pair name. 120 Name *string `pulumi:"name"` 121 // Public portion of a customer-generated key pair. Must be an ECDSA public key in PEM format. 122 // 123 // The following arguments are optional: 124 PublicKey *string `pulumi:"publicKey"` 125 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 126 Tags map[string]string `pulumi:"tags"` 127 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 128 // 129 // Deprecated: Please use `tags` instead. 130 TagsAll map[string]string `pulumi:"tagsAll"` 131 } 132 133 type PlaybackKeyPairState struct { 134 // ARN of the Playback Key Pair. 135 Arn pulumi.StringPtrInput 136 // Key-pair identifier. 137 Fingerprint pulumi.StringPtrInput 138 // Playback Key Pair name. 139 Name pulumi.StringPtrInput 140 // Public portion of a customer-generated key pair. Must be an ECDSA public key in PEM format. 141 // 142 // The following arguments are optional: 143 PublicKey pulumi.StringPtrInput 144 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 145 Tags pulumi.StringMapInput 146 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 147 // 148 // Deprecated: Please use `tags` instead. 149 TagsAll pulumi.StringMapInput 150 } 151 152 func (PlaybackKeyPairState) ElementType() reflect.Type { 153 return reflect.TypeOf((*playbackKeyPairState)(nil)).Elem() 154 } 155 156 type playbackKeyPairArgs struct { 157 // Playback Key Pair name. 158 Name *string `pulumi:"name"` 159 // Public portion of a customer-generated key pair. Must be an ECDSA public key in PEM format. 160 // 161 // The following arguments are optional: 162 PublicKey string `pulumi:"publicKey"` 163 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 164 Tags map[string]string `pulumi:"tags"` 165 } 166 167 // The set of arguments for constructing a PlaybackKeyPair resource. 168 type PlaybackKeyPairArgs struct { 169 // Playback Key Pair name. 170 Name pulumi.StringPtrInput 171 // Public portion of a customer-generated key pair. Must be an ECDSA public key in PEM format. 172 // 173 // The following arguments are optional: 174 PublicKey pulumi.StringInput 175 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 176 Tags pulumi.StringMapInput 177 } 178 179 func (PlaybackKeyPairArgs) ElementType() reflect.Type { 180 return reflect.TypeOf((*playbackKeyPairArgs)(nil)).Elem() 181 } 182 183 type PlaybackKeyPairInput interface { 184 pulumi.Input 185 186 ToPlaybackKeyPairOutput() PlaybackKeyPairOutput 187 ToPlaybackKeyPairOutputWithContext(ctx context.Context) PlaybackKeyPairOutput 188 } 189 190 func (*PlaybackKeyPair) ElementType() reflect.Type { 191 return reflect.TypeOf((**PlaybackKeyPair)(nil)).Elem() 192 } 193 194 func (i *PlaybackKeyPair) ToPlaybackKeyPairOutput() PlaybackKeyPairOutput { 195 return i.ToPlaybackKeyPairOutputWithContext(context.Background()) 196 } 197 198 func (i *PlaybackKeyPair) ToPlaybackKeyPairOutputWithContext(ctx context.Context) PlaybackKeyPairOutput { 199 return pulumi.ToOutputWithContext(ctx, i).(PlaybackKeyPairOutput) 200 } 201 202 // PlaybackKeyPairArrayInput is an input type that accepts PlaybackKeyPairArray and PlaybackKeyPairArrayOutput values. 203 // You can construct a concrete instance of `PlaybackKeyPairArrayInput` via: 204 // 205 // PlaybackKeyPairArray{ PlaybackKeyPairArgs{...} } 206 type PlaybackKeyPairArrayInput interface { 207 pulumi.Input 208 209 ToPlaybackKeyPairArrayOutput() PlaybackKeyPairArrayOutput 210 ToPlaybackKeyPairArrayOutputWithContext(context.Context) PlaybackKeyPairArrayOutput 211 } 212 213 type PlaybackKeyPairArray []PlaybackKeyPairInput 214 215 func (PlaybackKeyPairArray) ElementType() reflect.Type { 216 return reflect.TypeOf((*[]*PlaybackKeyPair)(nil)).Elem() 217 } 218 219 func (i PlaybackKeyPairArray) ToPlaybackKeyPairArrayOutput() PlaybackKeyPairArrayOutput { 220 return i.ToPlaybackKeyPairArrayOutputWithContext(context.Background()) 221 } 222 223 func (i PlaybackKeyPairArray) ToPlaybackKeyPairArrayOutputWithContext(ctx context.Context) PlaybackKeyPairArrayOutput { 224 return pulumi.ToOutputWithContext(ctx, i).(PlaybackKeyPairArrayOutput) 225 } 226 227 // PlaybackKeyPairMapInput is an input type that accepts PlaybackKeyPairMap and PlaybackKeyPairMapOutput values. 228 // You can construct a concrete instance of `PlaybackKeyPairMapInput` via: 229 // 230 // PlaybackKeyPairMap{ "key": PlaybackKeyPairArgs{...} } 231 type PlaybackKeyPairMapInput interface { 232 pulumi.Input 233 234 ToPlaybackKeyPairMapOutput() PlaybackKeyPairMapOutput 235 ToPlaybackKeyPairMapOutputWithContext(context.Context) PlaybackKeyPairMapOutput 236 } 237 238 type PlaybackKeyPairMap map[string]PlaybackKeyPairInput 239 240 func (PlaybackKeyPairMap) ElementType() reflect.Type { 241 return reflect.TypeOf((*map[string]*PlaybackKeyPair)(nil)).Elem() 242 } 243 244 func (i PlaybackKeyPairMap) ToPlaybackKeyPairMapOutput() PlaybackKeyPairMapOutput { 245 return i.ToPlaybackKeyPairMapOutputWithContext(context.Background()) 246 } 247 248 func (i PlaybackKeyPairMap) ToPlaybackKeyPairMapOutputWithContext(ctx context.Context) PlaybackKeyPairMapOutput { 249 return pulumi.ToOutputWithContext(ctx, i).(PlaybackKeyPairMapOutput) 250 } 251 252 type PlaybackKeyPairOutput struct{ *pulumi.OutputState } 253 254 func (PlaybackKeyPairOutput) ElementType() reflect.Type { 255 return reflect.TypeOf((**PlaybackKeyPair)(nil)).Elem() 256 } 257 258 func (o PlaybackKeyPairOutput) ToPlaybackKeyPairOutput() PlaybackKeyPairOutput { 259 return o 260 } 261 262 func (o PlaybackKeyPairOutput) ToPlaybackKeyPairOutputWithContext(ctx context.Context) PlaybackKeyPairOutput { 263 return o 264 } 265 266 // ARN of the Playback Key Pair. 267 func (o PlaybackKeyPairOutput) Arn() pulumi.StringOutput { 268 return o.ApplyT(func(v *PlaybackKeyPair) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 269 } 270 271 // Key-pair identifier. 272 func (o PlaybackKeyPairOutput) Fingerprint() pulumi.StringOutput { 273 return o.ApplyT(func(v *PlaybackKeyPair) pulumi.StringOutput { return v.Fingerprint }).(pulumi.StringOutput) 274 } 275 276 // Playback Key Pair name. 277 func (o PlaybackKeyPairOutput) Name() pulumi.StringOutput { 278 return o.ApplyT(func(v *PlaybackKeyPair) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 279 } 280 281 // Public portion of a customer-generated key pair. Must be an ECDSA public key in PEM format. 282 // 283 // The following arguments are optional: 284 func (o PlaybackKeyPairOutput) PublicKey() pulumi.StringOutput { 285 return o.ApplyT(func(v *PlaybackKeyPair) pulumi.StringOutput { return v.PublicKey }).(pulumi.StringOutput) 286 } 287 288 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 289 func (o PlaybackKeyPairOutput) Tags() pulumi.StringMapOutput { 290 return o.ApplyT(func(v *PlaybackKeyPair) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 291 } 292 293 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 294 // 295 // Deprecated: Please use `tags` instead. 296 func (o PlaybackKeyPairOutput) TagsAll() pulumi.StringMapOutput { 297 return o.ApplyT(func(v *PlaybackKeyPair) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 298 } 299 300 type PlaybackKeyPairArrayOutput struct{ *pulumi.OutputState } 301 302 func (PlaybackKeyPairArrayOutput) ElementType() reflect.Type { 303 return reflect.TypeOf((*[]*PlaybackKeyPair)(nil)).Elem() 304 } 305 306 func (o PlaybackKeyPairArrayOutput) ToPlaybackKeyPairArrayOutput() PlaybackKeyPairArrayOutput { 307 return o 308 } 309 310 func (o PlaybackKeyPairArrayOutput) ToPlaybackKeyPairArrayOutputWithContext(ctx context.Context) PlaybackKeyPairArrayOutput { 311 return o 312 } 313 314 func (o PlaybackKeyPairArrayOutput) Index(i pulumi.IntInput) PlaybackKeyPairOutput { 315 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PlaybackKeyPair { 316 return vs[0].([]*PlaybackKeyPair)[vs[1].(int)] 317 }).(PlaybackKeyPairOutput) 318 } 319 320 type PlaybackKeyPairMapOutput struct{ *pulumi.OutputState } 321 322 func (PlaybackKeyPairMapOutput) ElementType() reflect.Type { 323 return reflect.TypeOf((*map[string]*PlaybackKeyPair)(nil)).Elem() 324 } 325 326 func (o PlaybackKeyPairMapOutput) ToPlaybackKeyPairMapOutput() PlaybackKeyPairMapOutput { 327 return o 328 } 329 330 func (o PlaybackKeyPairMapOutput) ToPlaybackKeyPairMapOutputWithContext(ctx context.Context) PlaybackKeyPairMapOutput { 331 return o 332 } 333 334 func (o PlaybackKeyPairMapOutput) MapIndex(k pulumi.StringInput) PlaybackKeyPairOutput { 335 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PlaybackKeyPair { 336 return vs[0].(map[string]*PlaybackKeyPair)[vs[1].(string)] 337 }).(PlaybackKeyPairOutput) 338 } 339 340 func init() { 341 pulumi.RegisterInputType(reflect.TypeOf((*PlaybackKeyPairInput)(nil)).Elem(), &PlaybackKeyPair{}) 342 pulumi.RegisterInputType(reflect.TypeOf((*PlaybackKeyPairArrayInput)(nil)).Elem(), PlaybackKeyPairArray{}) 343 pulumi.RegisterInputType(reflect.TypeOf((*PlaybackKeyPairMapInput)(nil)).Elem(), PlaybackKeyPairMap{}) 344 pulumi.RegisterOutputType(PlaybackKeyPairOutput{}) 345 pulumi.RegisterOutputType(PlaybackKeyPairArrayOutput{}) 346 pulumi.RegisterOutputType(PlaybackKeyPairMapOutput{}) 347 }