github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cloudfront/keyValueStore.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 cloudfront 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 // Resource for managing an AWS CloudFront Key Value Store. 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/cloudfront" 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 := cloudfront.NewKeyValueStore(ctx, "example", &cloudfront.KeyValueStoreArgs{ 34 // Name: pulumi.String("ExampleKeyValueStore"), 35 // Comment: pulumi.String("This is an example key value store"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 // 47 // ## Import 48 // 49 // Using `pulumi import`, import CloudFront Key Value Store using the `name`. For example: 50 // 51 // ```sh 52 // $ pulumi import aws:cloudfront/keyValueStore:KeyValueStore example example_store 53 // ``` 54 type KeyValueStore struct { 55 pulumi.CustomResourceState 56 57 // Amazon Resource Name (ARN) identifying your CloudFront KeyValueStore. 58 Arn pulumi.StringOutput `pulumi:"arn"` 59 // Comment. 60 Comment pulumi.StringPtrOutput `pulumi:"comment"` 61 // ETag hash of the KeyValueStore. 62 Etag pulumi.StringOutput `pulumi:"etag"` 63 LastModifiedTime pulumi.StringOutput `pulumi:"lastModifiedTime"` 64 // Unique name for your CloudFront KeyValueStore. 65 // 66 // The following arguments are optional: 67 Name pulumi.StringOutput `pulumi:"name"` 68 Timeouts KeyValueStoreTimeoutsPtrOutput `pulumi:"timeouts"` 69 } 70 71 // NewKeyValueStore registers a new resource with the given unique name, arguments, and options. 72 func NewKeyValueStore(ctx *pulumi.Context, 73 name string, args *KeyValueStoreArgs, opts ...pulumi.ResourceOption) (*KeyValueStore, error) { 74 if args == nil { 75 args = &KeyValueStoreArgs{} 76 } 77 78 opts = internal.PkgResourceDefaultOpts(opts) 79 var resource KeyValueStore 80 err := ctx.RegisterResource("aws:cloudfront/keyValueStore:KeyValueStore", name, args, &resource, opts...) 81 if err != nil { 82 return nil, err 83 } 84 return &resource, nil 85 } 86 87 // GetKeyValueStore gets an existing KeyValueStore resource's state with the given name, ID, and optional 88 // state properties that are used to uniquely qualify the lookup (nil if not required). 89 func GetKeyValueStore(ctx *pulumi.Context, 90 name string, id pulumi.IDInput, state *KeyValueStoreState, opts ...pulumi.ResourceOption) (*KeyValueStore, error) { 91 var resource KeyValueStore 92 err := ctx.ReadResource("aws:cloudfront/keyValueStore:KeyValueStore", name, id, state, &resource, opts...) 93 if err != nil { 94 return nil, err 95 } 96 return &resource, nil 97 } 98 99 // Input properties used for looking up and filtering KeyValueStore resources. 100 type keyValueStoreState struct { 101 // Amazon Resource Name (ARN) identifying your CloudFront KeyValueStore. 102 Arn *string `pulumi:"arn"` 103 // Comment. 104 Comment *string `pulumi:"comment"` 105 // ETag hash of the KeyValueStore. 106 Etag *string `pulumi:"etag"` 107 LastModifiedTime *string `pulumi:"lastModifiedTime"` 108 // Unique name for your CloudFront KeyValueStore. 109 // 110 // The following arguments are optional: 111 Name *string `pulumi:"name"` 112 Timeouts *KeyValueStoreTimeouts `pulumi:"timeouts"` 113 } 114 115 type KeyValueStoreState struct { 116 // Amazon Resource Name (ARN) identifying your CloudFront KeyValueStore. 117 Arn pulumi.StringPtrInput 118 // Comment. 119 Comment pulumi.StringPtrInput 120 // ETag hash of the KeyValueStore. 121 Etag pulumi.StringPtrInput 122 LastModifiedTime pulumi.StringPtrInput 123 // Unique name for your CloudFront KeyValueStore. 124 // 125 // The following arguments are optional: 126 Name pulumi.StringPtrInput 127 Timeouts KeyValueStoreTimeoutsPtrInput 128 } 129 130 func (KeyValueStoreState) ElementType() reflect.Type { 131 return reflect.TypeOf((*keyValueStoreState)(nil)).Elem() 132 } 133 134 type keyValueStoreArgs struct { 135 // Comment. 136 Comment *string `pulumi:"comment"` 137 // Unique name for your CloudFront KeyValueStore. 138 // 139 // The following arguments are optional: 140 Name *string `pulumi:"name"` 141 Timeouts *KeyValueStoreTimeouts `pulumi:"timeouts"` 142 } 143 144 // The set of arguments for constructing a KeyValueStore resource. 145 type KeyValueStoreArgs struct { 146 // Comment. 147 Comment pulumi.StringPtrInput 148 // Unique name for your CloudFront KeyValueStore. 149 // 150 // The following arguments are optional: 151 Name pulumi.StringPtrInput 152 Timeouts KeyValueStoreTimeoutsPtrInput 153 } 154 155 func (KeyValueStoreArgs) ElementType() reflect.Type { 156 return reflect.TypeOf((*keyValueStoreArgs)(nil)).Elem() 157 } 158 159 type KeyValueStoreInput interface { 160 pulumi.Input 161 162 ToKeyValueStoreOutput() KeyValueStoreOutput 163 ToKeyValueStoreOutputWithContext(ctx context.Context) KeyValueStoreOutput 164 } 165 166 func (*KeyValueStore) ElementType() reflect.Type { 167 return reflect.TypeOf((**KeyValueStore)(nil)).Elem() 168 } 169 170 func (i *KeyValueStore) ToKeyValueStoreOutput() KeyValueStoreOutput { 171 return i.ToKeyValueStoreOutputWithContext(context.Background()) 172 } 173 174 func (i *KeyValueStore) ToKeyValueStoreOutputWithContext(ctx context.Context) KeyValueStoreOutput { 175 return pulumi.ToOutputWithContext(ctx, i).(KeyValueStoreOutput) 176 } 177 178 // KeyValueStoreArrayInput is an input type that accepts KeyValueStoreArray and KeyValueStoreArrayOutput values. 179 // You can construct a concrete instance of `KeyValueStoreArrayInput` via: 180 // 181 // KeyValueStoreArray{ KeyValueStoreArgs{...} } 182 type KeyValueStoreArrayInput interface { 183 pulumi.Input 184 185 ToKeyValueStoreArrayOutput() KeyValueStoreArrayOutput 186 ToKeyValueStoreArrayOutputWithContext(context.Context) KeyValueStoreArrayOutput 187 } 188 189 type KeyValueStoreArray []KeyValueStoreInput 190 191 func (KeyValueStoreArray) ElementType() reflect.Type { 192 return reflect.TypeOf((*[]*KeyValueStore)(nil)).Elem() 193 } 194 195 func (i KeyValueStoreArray) ToKeyValueStoreArrayOutput() KeyValueStoreArrayOutput { 196 return i.ToKeyValueStoreArrayOutputWithContext(context.Background()) 197 } 198 199 func (i KeyValueStoreArray) ToKeyValueStoreArrayOutputWithContext(ctx context.Context) KeyValueStoreArrayOutput { 200 return pulumi.ToOutputWithContext(ctx, i).(KeyValueStoreArrayOutput) 201 } 202 203 // KeyValueStoreMapInput is an input type that accepts KeyValueStoreMap and KeyValueStoreMapOutput values. 204 // You can construct a concrete instance of `KeyValueStoreMapInput` via: 205 // 206 // KeyValueStoreMap{ "key": KeyValueStoreArgs{...} } 207 type KeyValueStoreMapInput interface { 208 pulumi.Input 209 210 ToKeyValueStoreMapOutput() KeyValueStoreMapOutput 211 ToKeyValueStoreMapOutputWithContext(context.Context) KeyValueStoreMapOutput 212 } 213 214 type KeyValueStoreMap map[string]KeyValueStoreInput 215 216 func (KeyValueStoreMap) ElementType() reflect.Type { 217 return reflect.TypeOf((*map[string]*KeyValueStore)(nil)).Elem() 218 } 219 220 func (i KeyValueStoreMap) ToKeyValueStoreMapOutput() KeyValueStoreMapOutput { 221 return i.ToKeyValueStoreMapOutputWithContext(context.Background()) 222 } 223 224 func (i KeyValueStoreMap) ToKeyValueStoreMapOutputWithContext(ctx context.Context) KeyValueStoreMapOutput { 225 return pulumi.ToOutputWithContext(ctx, i).(KeyValueStoreMapOutput) 226 } 227 228 type KeyValueStoreOutput struct{ *pulumi.OutputState } 229 230 func (KeyValueStoreOutput) ElementType() reflect.Type { 231 return reflect.TypeOf((**KeyValueStore)(nil)).Elem() 232 } 233 234 func (o KeyValueStoreOutput) ToKeyValueStoreOutput() KeyValueStoreOutput { 235 return o 236 } 237 238 func (o KeyValueStoreOutput) ToKeyValueStoreOutputWithContext(ctx context.Context) KeyValueStoreOutput { 239 return o 240 } 241 242 // Amazon Resource Name (ARN) identifying your CloudFront KeyValueStore. 243 func (o KeyValueStoreOutput) Arn() pulumi.StringOutput { 244 return o.ApplyT(func(v *KeyValueStore) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 245 } 246 247 // Comment. 248 func (o KeyValueStoreOutput) Comment() pulumi.StringPtrOutput { 249 return o.ApplyT(func(v *KeyValueStore) pulumi.StringPtrOutput { return v.Comment }).(pulumi.StringPtrOutput) 250 } 251 252 // ETag hash of the KeyValueStore. 253 func (o KeyValueStoreOutput) Etag() pulumi.StringOutput { 254 return o.ApplyT(func(v *KeyValueStore) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) 255 } 256 257 func (o KeyValueStoreOutput) LastModifiedTime() pulumi.StringOutput { 258 return o.ApplyT(func(v *KeyValueStore) pulumi.StringOutput { return v.LastModifiedTime }).(pulumi.StringOutput) 259 } 260 261 // Unique name for your CloudFront KeyValueStore. 262 // 263 // The following arguments are optional: 264 func (o KeyValueStoreOutput) Name() pulumi.StringOutput { 265 return o.ApplyT(func(v *KeyValueStore) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 266 } 267 268 func (o KeyValueStoreOutput) Timeouts() KeyValueStoreTimeoutsPtrOutput { 269 return o.ApplyT(func(v *KeyValueStore) KeyValueStoreTimeoutsPtrOutput { return v.Timeouts }).(KeyValueStoreTimeoutsPtrOutput) 270 } 271 272 type KeyValueStoreArrayOutput struct{ *pulumi.OutputState } 273 274 func (KeyValueStoreArrayOutput) ElementType() reflect.Type { 275 return reflect.TypeOf((*[]*KeyValueStore)(nil)).Elem() 276 } 277 278 func (o KeyValueStoreArrayOutput) ToKeyValueStoreArrayOutput() KeyValueStoreArrayOutput { 279 return o 280 } 281 282 func (o KeyValueStoreArrayOutput) ToKeyValueStoreArrayOutputWithContext(ctx context.Context) KeyValueStoreArrayOutput { 283 return o 284 } 285 286 func (o KeyValueStoreArrayOutput) Index(i pulumi.IntInput) KeyValueStoreOutput { 287 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *KeyValueStore { 288 return vs[0].([]*KeyValueStore)[vs[1].(int)] 289 }).(KeyValueStoreOutput) 290 } 291 292 type KeyValueStoreMapOutput struct{ *pulumi.OutputState } 293 294 func (KeyValueStoreMapOutput) ElementType() reflect.Type { 295 return reflect.TypeOf((*map[string]*KeyValueStore)(nil)).Elem() 296 } 297 298 func (o KeyValueStoreMapOutput) ToKeyValueStoreMapOutput() KeyValueStoreMapOutput { 299 return o 300 } 301 302 func (o KeyValueStoreMapOutput) ToKeyValueStoreMapOutputWithContext(ctx context.Context) KeyValueStoreMapOutput { 303 return o 304 } 305 306 func (o KeyValueStoreMapOutput) MapIndex(k pulumi.StringInput) KeyValueStoreOutput { 307 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *KeyValueStore { 308 return vs[0].(map[string]*KeyValueStore)[vs[1].(string)] 309 }).(KeyValueStoreOutput) 310 } 311 312 func init() { 313 pulumi.RegisterInputType(reflect.TypeOf((*KeyValueStoreInput)(nil)).Elem(), &KeyValueStore{}) 314 pulumi.RegisterInputType(reflect.TypeOf((*KeyValueStoreArrayInput)(nil)).Elem(), KeyValueStoreArray{}) 315 pulumi.RegisterInputType(reflect.TypeOf((*KeyValueStoreMapInput)(nil)).Elem(), KeyValueStoreMap{}) 316 pulumi.RegisterOutputType(KeyValueStoreOutput{}) 317 pulumi.RegisterOutputType(KeyValueStoreArrayOutput{}) 318 pulumi.RegisterOutputType(KeyValueStoreMapOutput{}) 319 }