github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cfg/aggregateAuthorization.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 cfg 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 // Manages an AWS Config Aggregate Authorization 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cfg" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := cfg.NewAggregateAuthorization(ctx, "example", &cfg.AggregateAuthorizationArgs{ 33 // AccountId: pulumi.String("123456789012"), 34 // Region: pulumi.String("eu-west-2"), 35 // }) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 // 46 // ## Import 47 // 48 // Using `pulumi import`, import Config aggregate authorizations using `account_id:region`. For example: 49 // 50 // ```sh 51 // $ pulumi import aws:cfg/aggregateAuthorization:AggregateAuthorization example 123456789012:us-east-1 52 // ``` 53 type AggregateAuthorization struct { 54 pulumi.CustomResourceState 55 56 // Account ID 57 AccountId pulumi.StringOutput `pulumi:"accountId"` 58 // The ARN of the authorization 59 Arn pulumi.StringOutput `pulumi:"arn"` 60 // Region 61 Region pulumi.StringOutput `pulumi:"region"` 62 // 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. 63 Tags pulumi.StringMapOutput `pulumi:"tags"` 64 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 65 // 66 // Deprecated: Please use `tags` instead. 67 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 68 } 69 70 // NewAggregateAuthorization registers a new resource with the given unique name, arguments, and options. 71 func NewAggregateAuthorization(ctx *pulumi.Context, 72 name string, args *AggregateAuthorizationArgs, opts ...pulumi.ResourceOption) (*AggregateAuthorization, error) { 73 if args == nil { 74 return nil, errors.New("missing one or more required arguments") 75 } 76 77 if args.AccountId == nil { 78 return nil, errors.New("invalid value for required argument 'AccountId'") 79 } 80 if args.Region == nil { 81 return nil, errors.New("invalid value for required argument 'Region'") 82 } 83 opts = internal.PkgResourceDefaultOpts(opts) 84 var resource AggregateAuthorization 85 err := ctx.RegisterResource("aws:cfg/aggregateAuthorization:AggregateAuthorization", name, args, &resource, opts...) 86 if err != nil { 87 return nil, err 88 } 89 return &resource, nil 90 } 91 92 // GetAggregateAuthorization gets an existing AggregateAuthorization resource's state with the given name, ID, and optional 93 // state properties that are used to uniquely qualify the lookup (nil if not required). 94 func GetAggregateAuthorization(ctx *pulumi.Context, 95 name string, id pulumi.IDInput, state *AggregateAuthorizationState, opts ...pulumi.ResourceOption) (*AggregateAuthorization, error) { 96 var resource AggregateAuthorization 97 err := ctx.ReadResource("aws:cfg/aggregateAuthorization:AggregateAuthorization", name, id, state, &resource, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return &resource, nil 102 } 103 104 // Input properties used for looking up and filtering AggregateAuthorization resources. 105 type aggregateAuthorizationState struct { 106 // Account ID 107 AccountId *string `pulumi:"accountId"` 108 // The ARN of the authorization 109 Arn *string `pulumi:"arn"` 110 // Region 111 Region *string `pulumi:"region"` 112 // 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. 113 Tags map[string]string `pulumi:"tags"` 114 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 115 // 116 // Deprecated: Please use `tags` instead. 117 TagsAll map[string]string `pulumi:"tagsAll"` 118 } 119 120 type AggregateAuthorizationState struct { 121 // Account ID 122 AccountId pulumi.StringPtrInput 123 // The ARN of the authorization 124 Arn pulumi.StringPtrInput 125 // Region 126 Region pulumi.StringPtrInput 127 // 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. 128 Tags pulumi.StringMapInput 129 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 130 // 131 // Deprecated: Please use `tags` instead. 132 TagsAll pulumi.StringMapInput 133 } 134 135 func (AggregateAuthorizationState) ElementType() reflect.Type { 136 return reflect.TypeOf((*aggregateAuthorizationState)(nil)).Elem() 137 } 138 139 type aggregateAuthorizationArgs struct { 140 // Account ID 141 AccountId string `pulumi:"accountId"` 142 // Region 143 Region string `pulumi:"region"` 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 map[string]string `pulumi:"tags"` 146 } 147 148 // The set of arguments for constructing a AggregateAuthorization resource. 149 type AggregateAuthorizationArgs struct { 150 // Account ID 151 AccountId pulumi.StringInput 152 // Region 153 Region pulumi.StringInput 154 // 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. 155 Tags pulumi.StringMapInput 156 } 157 158 func (AggregateAuthorizationArgs) ElementType() reflect.Type { 159 return reflect.TypeOf((*aggregateAuthorizationArgs)(nil)).Elem() 160 } 161 162 type AggregateAuthorizationInput interface { 163 pulumi.Input 164 165 ToAggregateAuthorizationOutput() AggregateAuthorizationOutput 166 ToAggregateAuthorizationOutputWithContext(ctx context.Context) AggregateAuthorizationOutput 167 } 168 169 func (*AggregateAuthorization) ElementType() reflect.Type { 170 return reflect.TypeOf((**AggregateAuthorization)(nil)).Elem() 171 } 172 173 func (i *AggregateAuthorization) ToAggregateAuthorizationOutput() AggregateAuthorizationOutput { 174 return i.ToAggregateAuthorizationOutputWithContext(context.Background()) 175 } 176 177 func (i *AggregateAuthorization) ToAggregateAuthorizationOutputWithContext(ctx context.Context) AggregateAuthorizationOutput { 178 return pulumi.ToOutputWithContext(ctx, i).(AggregateAuthorizationOutput) 179 } 180 181 // AggregateAuthorizationArrayInput is an input type that accepts AggregateAuthorizationArray and AggregateAuthorizationArrayOutput values. 182 // You can construct a concrete instance of `AggregateAuthorizationArrayInput` via: 183 // 184 // AggregateAuthorizationArray{ AggregateAuthorizationArgs{...} } 185 type AggregateAuthorizationArrayInput interface { 186 pulumi.Input 187 188 ToAggregateAuthorizationArrayOutput() AggregateAuthorizationArrayOutput 189 ToAggregateAuthorizationArrayOutputWithContext(context.Context) AggregateAuthorizationArrayOutput 190 } 191 192 type AggregateAuthorizationArray []AggregateAuthorizationInput 193 194 func (AggregateAuthorizationArray) ElementType() reflect.Type { 195 return reflect.TypeOf((*[]*AggregateAuthorization)(nil)).Elem() 196 } 197 198 func (i AggregateAuthorizationArray) ToAggregateAuthorizationArrayOutput() AggregateAuthorizationArrayOutput { 199 return i.ToAggregateAuthorizationArrayOutputWithContext(context.Background()) 200 } 201 202 func (i AggregateAuthorizationArray) ToAggregateAuthorizationArrayOutputWithContext(ctx context.Context) AggregateAuthorizationArrayOutput { 203 return pulumi.ToOutputWithContext(ctx, i).(AggregateAuthorizationArrayOutput) 204 } 205 206 // AggregateAuthorizationMapInput is an input type that accepts AggregateAuthorizationMap and AggregateAuthorizationMapOutput values. 207 // You can construct a concrete instance of `AggregateAuthorizationMapInput` via: 208 // 209 // AggregateAuthorizationMap{ "key": AggregateAuthorizationArgs{...} } 210 type AggregateAuthorizationMapInput interface { 211 pulumi.Input 212 213 ToAggregateAuthorizationMapOutput() AggregateAuthorizationMapOutput 214 ToAggregateAuthorizationMapOutputWithContext(context.Context) AggregateAuthorizationMapOutput 215 } 216 217 type AggregateAuthorizationMap map[string]AggregateAuthorizationInput 218 219 func (AggregateAuthorizationMap) ElementType() reflect.Type { 220 return reflect.TypeOf((*map[string]*AggregateAuthorization)(nil)).Elem() 221 } 222 223 func (i AggregateAuthorizationMap) ToAggregateAuthorizationMapOutput() AggregateAuthorizationMapOutput { 224 return i.ToAggregateAuthorizationMapOutputWithContext(context.Background()) 225 } 226 227 func (i AggregateAuthorizationMap) ToAggregateAuthorizationMapOutputWithContext(ctx context.Context) AggregateAuthorizationMapOutput { 228 return pulumi.ToOutputWithContext(ctx, i).(AggregateAuthorizationMapOutput) 229 } 230 231 type AggregateAuthorizationOutput struct{ *pulumi.OutputState } 232 233 func (AggregateAuthorizationOutput) ElementType() reflect.Type { 234 return reflect.TypeOf((**AggregateAuthorization)(nil)).Elem() 235 } 236 237 func (o AggregateAuthorizationOutput) ToAggregateAuthorizationOutput() AggregateAuthorizationOutput { 238 return o 239 } 240 241 func (o AggregateAuthorizationOutput) ToAggregateAuthorizationOutputWithContext(ctx context.Context) AggregateAuthorizationOutput { 242 return o 243 } 244 245 // Account ID 246 func (o AggregateAuthorizationOutput) AccountId() pulumi.StringOutput { 247 return o.ApplyT(func(v *AggregateAuthorization) pulumi.StringOutput { return v.AccountId }).(pulumi.StringOutput) 248 } 249 250 // The ARN of the authorization 251 func (o AggregateAuthorizationOutput) Arn() pulumi.StringOutput { 252 return o.ApplyT(func(v *AggregateAuthorization) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 253 } 254 255 // Region 256 func (o AggregateAuthorizationOutput) Region() pulumi.StringOutput { 257 return o.ApplyT(func(v *AggregateAuthorization) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput) 258 } 259 260 // 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. 261 func (o AggregateAuthorizationOutput) Tags() pulumi.StringMapOutput { 262 return o.ApplyT(func(v *AggregateAuthorization) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 263 } 264 265 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 266 // 267 // Deprecated: Please use `tags` instead. 268 func (o AggregateAuthorizationOutput) TagsAll() pulumi.StringMapOutput { 269 return o.ApplyT(func(v *AggregateAuthorization) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 270 } 271 272 type AggregateAuthorizationArrayOutput struct{ *pulumi.OutputState } 273 274 func (AggregateAuthorizationArrayOutput) ElementType() reflect.Type { 275 return reflect.TypeOf((*[]*AggregateAuthorization)(nil)).Elem() 276 } 277 278 func (o AggregateAuthorizationArrayOutput) ToAggregateAuthorizationArrayOutput() AggregateAuthorizationArrayOutput { 279 return o 280 } 281 282 func (o AggregateAuthorizationArrayOutput) ToAggregateAuthorizationArrayOutputWithContext(ctx context.Context) AggregateAuthorizationArrayOutput { 283 return o 284 } 285 286 func (o AggregateAuthorizationArrayOutput) Index(i pulumi.IntInput) AggregateAuthorizationOutput { 287 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AggregateAuthorization { 288 return vs[0].([]*AggregateAuthorization)[vs[1].(int)] 289 }).(AggregateAuthorizationOutput) 290 } 291 292 type AggregateAuthorizationMapOutput struct{ *pulumi.OutputState } 293 294 func (AggregateAuthorizationMapOutput) ElementType() reflect.Type { 295 return reflect.TypeOf((*map[string]*AggregateAuthorization)(nil)).Elem() 296 } 297 298 func (o AggregateAuthorizationMapOutput) ToAggregateAuthorizationMapOutput() AggregateAuthorizationMapOutput { 299 return o 300 } 301 302 func (o AggregateAuthorizationMapOutput) ToAggregateAuthorizationMapOutputWithContext(ctx context.Context) AggregateAuthorizationMapOutput { 303 return o 304 } 305 306 func (o AggregateAuthorizationMapOutput) MapIndex(k pulumi.StringInput) AggregateAuthorizationOutput { 307 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AggregateAuthorization { 308 return vs[0].(map[string]*AggregateAuthorization)[vs[1].(string)] 309 }).(AggregateAuthorizationOutput) 310 } 311 312 func init() { 313 pulumi.RegisterInputType(reflect.TypeOf((*AggregateAuthorizationInput)(nil)).Elem(), &AggregateAuthorization{}) 314 pulumi.RegisterInputType(reflect.TypeOf((*AggregateAuthorizationArrayInput)(nil)).Elem(), AggregateAuthorizationArray{}) 315 pulumi.RegisterInputType(reflect.TypeOf((*AggregateAuthorizationMapInput)(nil)).Elem(), AggregateAuthorizationMap{}) 316 pulumi.RegisterOutputType(AggregateAuthorizationOutput{}) 317 pulumi.RegisterOutputType(AggregateAuthorizationArrayOutput{}) 318 pulumi.RegisterOutputType(AggregateAuthorizationMapOutput{}) 319 }