github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lb/trustStoreRevocation.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 lb 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 // Provides a ELBv2 Trust Store Revocation for use with Application Load Balancer Listener resources. 16 // 17 // ## Example Usage 18 // 19 // ### Trust Store With Revocations 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // test, err := lb.NewTrustStore(ctx, "test", &lb.TrustStoreArgs{ 35 // Name: pulumi.String("tf-example-lb-ts"), 36 // CaCertificatesBundleS3Bucket: pulumi.String("..."), 37 // CaCertificatesBundleS3Key: pulumi.String("..."), 38 // }) 39 // if err != nil { 40 // return err 41 // } 42 // _, err = lb.NewTrustStoreRevocation(ctx, "test", &lb.TrustStoreRevocationArgs{ 43 // TrustStoreArn: test.Arn, 44 // RevocationsS3Bucket: pulumi.String("..."), 45 // RevocationsS3Key: pulumi.String("..."), 46 // }) 47 // if err != nil { 48 // return err 49 // } 50 // return nil 51 // }) 52 // } 53 // 54 // ``` 55 // <!--End PulumiCodeChooser --> 56 // 57 // ## Import 58 // 59 // Using `pulumi import`, import Trust Store Revocations using their ARN. For example: 60 // 61 // ```sh 62 // $ pulumi import aws:lb/trustStoreRevocation:TrustStoreRevocation example arn:aws:elasticloadbalancing:us-west-2:187416307283:truststore/my-trust-store/20cfe21448b66314,6 63 // ``` 64 type TrustStoreRevocation struct { 65 pulumi.CustomResourceState 66 67 // AWS assigned RevocationId, (number). 68 RevocationId pulumi.IntOutput `pulumi:"revocationId"` 69 // S3 Bucket name holding the client certificate CA bundle. 70 RevocationsS3Bucket pulumi.StringOutput `pulumi:"revocationsS3Bucket"` 71 // S3 object key holding the client certificate CA bundle. 72 RevocationsS3Key pulumi.StringOutput `pulumi:"revocationsS3Key"` 73 // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. 74 RevocationsS3ObjectVersion pulumi.StringPtrOutput `pulumi:"revocationsS3ObjectVersion"` 75 // Trust Store ARN. 76 TrustStoreArn pulumi.StringOutput `pulumi:"trustStoreArn"` 77 } 78 79 // NewTrustStoreRevocation registers a new resource with the given unique name, arguments, and options. 80 func NewTrustStoreRevocation(ctx *pulumi.Context, 81 name string, args *TrustStoreRevocationArgs, opts ...pulumi.ResourceOption) (*TrustStoreRevocation, error) { 82 if args == nil { 83 return nil, errors.New("missing one or more required arguments") 84 } 85 86 if args.RevocationsS3Bucket == nil { 87 return nil, errors.New("invalid value for required argument 'RevocationsS3Bucket'") 88 } 89 if args.RevocationsS3Key == nil { 90 return nil, errors.New("invalid value for required argument 'RevocationsS3Key'") 91 } 92 if args.TrustStoreArn == nil { 93 return nil, errors.New("invalid value for required argument 'TrustStoreArn'") 94 } 95 opts = internal.PkgResourceDefaultOpts(opts) 96 var resource TrustStoreRevocation 97 err := ctx.RegisterResource("aws:lb/trustStoreRevocation:TrustStoreRevocation", name, args, &resource, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return &resource, nil 102 } 103 104 // GetTrustStoreRevocation gets an existing TrustStoreRevocation resource's state with the given name, ID, and optional 105 // state properties that are used to uniquely qualify the lookup (nil if not required). 106 func GetTrustStoreRevocation(ctx *pulumi.Context, 107 name string, id pulumi.IDInput, state *TrustStoreRevocationState, opts ...pulumi.ResourceOption) (*TrustStoreRevocation, error) { 108 var resource TrustStoreRevocation 109 err := ctx.ReadResource("aws:lb/trustStoreRevocation:TrustStoreRevocation", name, id, state, &resource, opts...) 110 if err != nil { 111 return nil, err 112 } 113 return &resource, nil 114 } 115 116 // Input properties used for looking up and filtering TrustStoreRevocation resources. 117 type trustStoreRevocationState struct { 118 // AWS assigned RevocationId, (number). 119 RevocationId *int `pulumi:"revocationId"` 120 // S3 Bucket name holding the client certificate CA bundle. 121 RevocationsS3Bucket *string `pulumi:"revocationsS3Bucket"` 122 // S3 object key holding the client certificate CA bundle. 123 RevocationsS3Key *string `pulumi:"revocationsS3Key"` 124 // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. 125 RevocationsS3ObjectVersion *string `pulumi:"revocationsS3ObjectVersion"` 126 // Trust Store ARN. 127 TrustStoreArn *string `pulumi:"trustStoreArn"` 128 } 129 130 type TrustStoreRevocationState struct { 131 // AWS assigned RevocationId, (number). 132 RevocationId pulumi.IntPtrInput 133 // S3 Bucket name holding the client certificate CA bundle. 134 RevocationsS3Bucket pulumi.StringPtrInput 135 // S3 object key holding the client certificate CA bundle. 136 RevocationsS3Key pulumi.StringPtrInput 137 // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. 138 RevocationsS3ObjectVersion pulumi.StringPtrInput 139 // Trust Store ARN. 140 TrustStoreArn pulumi.StringPtrInput 141 } 142 143 func (TrustStoreRevocationState) ElementType() reflect.Type { 144 return reflect.TypeOf((*trustStoreRevocationState)(nil)).Elem() 145 } 146 147 type trustStoreRevocationArgs struct { 148 // S3 Bucket name holding the client certificate CA bundle. 149 RevocationsS3Bucket string `pulumi:"revocationsS3Bucket"` 150 // S3 object key holding the client certificate CA bundle. 151 RevocationsS3Key string `pulumi:"revocationsS3Key"` 152 // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. 153 RevocationsS3ObjectVersion *string `pulumi:"revocationsS3ObjectVersion"` 154 // Trust Store ARN. 155 TrustStoreArn string `pulumi:"trustStoreArn"` 156 } 157 158 // The set of arguments for constructing a TrustStoreRevocation resource. 159 type TrustStoreRevocationArgs struct { 160 // S3 Bucket name holding the client certificate CA bundle. 161 RevocationsS3Bucket pulumi.StringInput 162 // S3 object key holding the client certificate CA bundle. 163 RevocationsS3Key pulumi.StringInput 164 // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. 165 RevocationsS3ObjectVersion pulumi.StringPtrInput 166 // Trust Store ARN. 167 TrustStoreArn pulumi.StringInput 168 } 169 170 func (TrustStoreRevocationArgs) ElementType() reflect.Type { 171 return reflect.TypeOf((*trustStoreRevocationArgs)(nil)).Elem() 172 } 173 174 type TrustStoreRevocationInput interface { 175 pulumi.Input 176 177 ToTrustStoreRevocationOutput() TrustStoreRevocationOutput 178 ToTrustStoreRevocationOutputWithContext(ctx context.Context) TrustStoreRevocationOutput 179 } 180 181 func (*TrustStoreRevocation) ElementType() reflect.Type { 182 return reflect.TypeOf((**TrustStoreRevocation)(nil)).Elem() 183 } 184 185 func (i *TrustStoreRevocation) ToTrustStoreRevocationOutput() TrustStoreRevocationOutput { 186 return i.ToTrustStoreRevocationOutputWithContext(context.Background()) 187 } 188 189 func (i *TrustStoreRevocation) ToTrustStoreRevocationOutputWithContext(ctx context.Context) TrustStoreRevocationOutput { 190 return pulumi.ToOutputWithContext(ctx, i).(TrustStoreRevocationOutput) 191 } 192 193 // TrustStoreRevocationArrayInput is an input type that accepts TrustStoreRevocationArray and TrustStoreRevocationArrayOutput values. 194 // You can construct a concrete instance of `TrustStoreRevocationArrayInput` via: 195 // 196 // TrustStoreRevocationArray{ TrustStoreRevocationArgs{...} } 197 type TrustStoreRevocationArrayInput interface { 198 pulumi.Input 199 200 ToTrustStoreRevocationArrayOutput() TrustStoreRevocationArrayOutput 201 ToTrustStoreRevocationArrayOutputWithContext(context.Context) TrustStoreRevocationArrayOutput 202 } 203 204 type TrustStoreRevocationArray []TrustStoreRevocationInput 205 206 func (TrustStoreRevocationArray) ElementType() reflect.Type { 207 return reflect.TypeOf((*[]*TrustStoreRevocation)(nil)).Elem() 208 } 209 210 func (i TrustStoreRevocationArray) ToTrustStoreRevocationArrayOutput() TrustStoreRevocationArrayOutput { 211 return i.ToTrustStoreRevocationArrayOutputWithContext(context.Background()) 212 } 213 214 func (i TrustStoreRevocationArray) ToTrustStoreRevocationArrayOutputWithContext(ctx context.Context) TrustStoreRevocationArrayOutput { 215 return pulumi.ToOutputWithContext(ctx, i).(TrustStoreRevocationArrayOutput) 216 } 217 218 // TrustStoreRevocationMapInput is an input type that accepts TrustStoreRevocationMap and TrustStoreRevocationMapOutput values. 219 // You can construct a concrete instance of `TrustStoreRevocationMapInput` via: 220 // 221 // TrustStoreRevocationMap{ "key": TrustStoreRevocationArgs{...} } 222 type TrustStoreRevocationMapInput interface { 223 pulumi.Input 224 225 ToTrustStoreRevocationMapOutput() TrustStoreRevocationMapOutput 226 ToTrustStoreRevocationMapOutputWithContext(context.Context) TrustStoreRevocationMapOutput 227 } 228 229 type TrustStoreRevocationMap map[string]TrustStoreRevocationInput 230 231 func (TrustStoreRevocationMap) ElementType() reflect.Type { 232 return reflect.TypeOf((*map[string]*TrustStoreRevocation)(nil)).Elem() 233 } 234 235 func (i TrustStoreRevocationMap) ToTrustStoreRevocationMapOutput() TrustStoreRevocationMapOutput { 236 return i.ToTrustStoreRevocationMapOutputWithContext(context.Background()) 237 } 238 239 func (i TrustStoreRevocationMap) ToTrustStoreRevocationMapOutputWithContext(ctx context.Context) TrustStoreRevocationMapOutput { 240 return pulumi.ToOutputWithContext(ctx, i).(TrustStoreRevocationMapOutput) 241 } 242 243 type TrustStoreRevocationOutput struct{ *pulumi.OutputState } 244 245 func (TrustStoreRevocationOutput) ElementType() reflect.Type { 246 return reflect.TypeOf((**TrustStoreRevocation)(nil)).Elem() 247 } 248 249 func (o TrustStoreRevocationOutput) ToTrustStoreRevocationOutput() TrustStoreRevocationOutput { 250 return o 251 } 252 253 func (o TrustStoreRevocationOutput) ToTrustStoreRevocationOutputWithContext(ctx context.Context) TrustStoreRevocationOutput { 254 return o 255 } 256 257 // AWS assigned RevocationId, (number). 258 func (o TrustStoreRevocationOutput) RevocationId() pulumi.IntOutput { 259 return o.ApplyT(func(v *TrustStoreRevocation) pulumi.IntOutput { return v.RevocationId }).(pulumi.IntOutput) 260 } 261 262 // S3 Bucket name holding the client certificate CA bundle. 263 func (o TrustStoreRevocationOutput) RevocationsS3Bucket() pulumi.StringOutput { 264 return o.ApplyT(func(v *TrustStoreRevocation) pulumi.StringOutput { return v.RevocationsS3Bucket }).(pulumi.StringOutput) 265 } 266 267 // S3 object key holding the client certificate CA bundle. 268 func (o TrustStoreRevocationOutput) RevocationsS3Key() pulumi.StringOutput { 269 return o.ApplyT(func(v *TrustStoreRevocation) pulumi.StringOutput { return v.RevocationsS3Key }).(pulumi.StringOutput) 270 } 271 272 // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted. 273 func (o TrustStoreRevocationOutput) RevocationsS3ObjectVersion() pulumi.StringPtrOutput { 274 return o.ApplyT(func(v *TrustStoreRevocation) pulumi.StringPtrOutput { return v.RevocationsS3ObjectVersion }).(pulumi.StringPtrOutput) 275 } 276 277 // Trust Store ARN. 278 func (o TrustStoreRevocationOutput) TrustStoreArn() pulumi.StringOutput { 279 return o.ApplyT(func(v *TrustStoreRevocation) pulumi.StringOutput { return v.TrustStoreArn }).(pulumi.StringOutput) 280 } 281 282 type TrustStoreRevocationArrayOutput struct{ *pulumi.OutputState } 283 284 func (TrustStoreRevocationArrayOutput) ElementType() reflect.Type { 285 return reflect.TypeOf((*[]*TrustStoreRevocation)(nil)).Elem() 286 } 287 288 func (o TrustStoreRevocationArrayOutput) ToTrustStoreRevocationArrayOutput() TrustStoreRevocationArrayOutput { 289 return o 290 } 291 292 func (o TrustStoreRevocationArrayOutput) ToTrustStoreRevocationArrayOutputWithContext(ctx context.Context) TrustStoreRevocationArrayOutput { 293 return o 294 } 295 296 func (o TrustStoreRevocationArrayOutput) Index(i pulumi.IntInput) TrustStoreRevocationOutput { 297 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrustStoreRevocation { 298 return vs[0].([]*TrustStoreRevocation)[vs[1].(int)] 299 }).(TrustStoreRevocationOutput) 300 } 301 302 type TrustStoreRevocationMapOutput struct{ *pulumi.OutputState } 303 304 func (TrustStoreRevocationMapOutput) ElementType() reflect.Type { 305 return reflect.TypeOf((*map[string]*TrustStoreRevocation)(nil)).Elem() 306 } 307 308 func (o TrustStoreRevocationMapOutput) ToTrustStoreRevocationMapOutput() TrustStoreRevocationMapOutput { 309 return o 310 } 311 312 func (o TrustStoreRevocationMapOutput) ToTrustStoreRevocationMapOutputWithContext(ctx context.Context) TrustStoreRevocationMapOutput { 313 return o 314 } 315 316 func (o TrustStoreRevocationMapOutput) MapIndex(k pulumi.StringInput) TrustStoreRevocationOutput { 317 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrustStoreRevocation { 318 return vs[0].(map[string]*TrustStoreRevocation)[vs[1].(string)] 319 }).(TrustStoreRevocationOutput) 320 } 321 322 func init() { 323 pulumi.RegisterInputType(reflect.TypeOf((*TrustStoreRevocationInput)(nil)).Elem(), &TrustStoreRevocation{}) 324 pulumi.RegisterInputType(reflect.TypeOf((*TrustStoreRevocationArrayInput)(nil)).Elem(), TrustStoreRevocationArray{}) 325 pulumi.RegisterInputType(reflect.TypeOf((*TrustStoreRevocationMapInput)(nil)).Elem(), TrustStoreRevocationMap{}) 326 pulumi.RegisterOutputType(TrustStoreRevocationOutput{}) 327 pulumi.RegisterOutputType(TrustStoreRevocationArrayOutput{}) 328 pulumi.RegisterOutputType(TrustStoreRevocationMapOutput{}) 329 }