github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/networkfirewall/ruleGroup.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 networkfirewall 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 an AWS Network Firewall Rule Group Resource 16 // 17 // ## Example Usage 18 // 19 // ### Stateful Inspection for denying access to a domain 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := networkfirewall.NewRuleGroup(ctx, "example", &networkfirewall.RuleGroupArgs{ 35 // Capacity: pulumi.Int(100), 36 // Name: pulumi.String("example"), 37 // Type: pulumi.String("STATEFUL"), 38 // RuleGroup: &networkfirewall.RuleGroupRuleGroupArgs{ 39 // RulesSource: &networkfirewall.RuleGroupRuleGroupRulesSourceArgs{ 40 // RulesSourceList: &networkfirewall.RuleGroupRuleGroupRulesSourceRulesSourceListArgs{ 41 // GeneratedRulesType: pulumi.String("DENYLIST"), 42 // TargetTypes: pulumi.StringArray{ 43 // pulumi.String("HTTP_HOST"), 44 // }, 45 // Targets: pulumi.StringArray{ 46 // pulumi.String("test.example.com"), 47 // }, 48 // }, 49 // }, 50 // }, 51 // Tags: pulumi.StringMap{ 52 // "Tag1": pulumi.String("Value1"), 53 // "Tag2": pulumi.String("Value2"), 54 // }, 55 // }) 56 // if err != nil { 57 // return err 58 // } 59 // return nil 60 // }) 61 // } 62 // 63 // ``` 64 // <!--End PulumiCodeChooser --> 65 // 66 // ### Stateful Inspection for blocking packets from going to an intended destination 67 // 68 // <!--Start PulumiCodeChooser --> 69 // ```go 70 // package main 71 // 72 // import ( 73 // 74 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall" 75 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 76 // 77 // ) 78 // 79 // func main() { 80 // pulumi.Run(func(ctx *pulumi.Context) error { 81 // _, err := networkfirewall.NewRuleGroup(ctx, "example", &networkfirewall.RuleGroupArgs{ 82 // Capacity: pulumi.Int(100), 83 // Name: pulumi.String("example"), 84 // Type: pulumi.String("STATEFUL"), 85 // RuleGroup: &networkfirewall.RuleGroupRuleGroupArgs{ 86 // RulesSource: &networkfirewall.RuleGroupRuleGroupRulesSourceArgs{ 87 // StatefulRules: networkfirewall.RuleGroupRuleGroupRulesSourceStatefulRuleArray{ 88 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatefulRuleArgs{ 89 // Action: pulumi.String("DROP"), 90 // Header: &networkfirewall.RuleGroupRuleGroupRulesSourceStatefulRuleHeaderArgs{ 91 // Destination: pulumi.String("124.1.1.24/32"), 92 // DestinationPort: pulumi.String("53"), 93 // Direction: pulumi.String("ANY"), 94 // Protocol: pulumi.String("TCP"), 95 // Source: pulumi.String("1.2.3.4/32"), 96 // SourcePort: pulumi.String("53"), 97 // }, 98 // RuleOptions: networkfirewall.RuleGroupRuleGroupRulesSourceStatefulRuleRuleOptionArray{ 99 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatefulRuleRuleOptionArgs{ 100 // Keyword: pulumi.String("sid"), 101 // Settings: pulumi.StringArray{ 102 // pulumi.String("1"), 103 // }, 104 // }, 105 // }, 106 // }, 107 // }, 108 // }, 109 // }, 110 // Tags: pulumi.StringMap{ 111 // "Tag1": pulumi.String("Value1"), 112 // "Tag2": pulumi.String("Value2"), 113 // }, 114 // }) 115 // if err != nil { 116 // return err 117 // } 118 // return nil 119 // }) 120 // } 121 // 122 // ``` 123 // <!--End PulumiCodeChooser --> 124 // 125 // ### Stateful Inspection from rules specifications defined in Suricata flat format 126 // 127 // <!--Start PulumiCodeChooser --> 128 // ```go 129 // package main 130 // 131 // import ( 132 // 133 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall" 134 // "github.com/pulumi/pulumi-std/sdk/go/std" 135 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 136 // 137 // ) 138 // 139 // func main() { 140 // pulumi.Run(func(ctx *pulumi.Context) error { 141 // invokeFile, err := std.File(ctx, &std.FileArgs{ 142 // Input: "example.rules", 143 // }, nil) 144 // if err != nil { 145 // return err 146 // } 147 // _, err = networkfirewall.NewRuleGroup(ctx, "example", &networkfirewall.RuleGroupArgs{ 148 // Capacity: pulumi.Int(100), 149 // Name: pulumi.String("example"), 150 // Type: pulumi.String("STATEFUL"), 151 // Rules: invokeFile.Result, 152 // Tags: pulumi.StringMap{ 153 // "Tag1": pulumi.String("Value1"), 154 // "Tag2": pulumi.String("Value2"), 155 // }, 156 // }) 157 // if err != nil { 158 // return err 159 // } 160 // return nil 161 // }) 162 // } 163 // 164 // ``` 165 // <!--End PulumiCodeChooser --> 166 // 167 // ### Stateful Inspection from rule group specifications using rule variables and Suricata format rules 168 // 169 // <!--Start PulumiCodeChooser --> 170 // ```go 171 // package main 172 // 173 // import ( 174 // 175 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall" 176 // "github.com/pulumi/pulumi-std/sdk/go/std" 177 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 178 // 179 // ) 180 // 181 // func main() { 182 // pulumi.Run(func(ctx *pulumi.Context) error { 183 // invokeFile, err := std.File(ctx, &std.FileArgs{ 184 // Input: "suricata_rules_file", 185 // }, nil) 186 // if err != nil { 187 // return err 188 // } 189 // _, err = networkfirewall.NewRuleGroup(ctx, "example", &networkfirewall.RuleGroupArgs{ 190 // Capacity: pulumi.Int(100), 191 // Name: pulumi.String("example"), 192 // Type: pulumi.String("STATEFUL"), 193 // RuleGroup: &networkfirewall.RuleGroupRuleGroupArgs{ 194 // RuleVariables: &networkfirewall.RuleGroupRuleGroupRuleVariablesArgs{ 195 // IpSets: networkfirewall.RuleGroupRuleGroupRuleVariablesIpSetArray{ 196 // &networkfirewall.RuleGroupRuleGroupRuleVariablesIpSetArgs{ 197 // Key: pulumi.String("WEBSERVERS_HOSTS"), 198 // IpSet: &networkfirewall.RuleGroupRuleGroupRuleVariablesIpSetIpSetArgs{ 199 // Definitions: pulumi.StringArray{ 200 // pulumi.String("10.0.0.0/16"), 201 // pulumi.String("10.0.1.0/24"), 202 // pulumi.String("192.168.0.0/16"), 203 // }, 204 // }, 205 // }, 206 // &networkfirewall.RuleGroupRuleGroupRuleVariablesIpSetArgs{ 207 // Key: pulumi.String("EXTERNAL_HOST"), 208 // IpSet: &networkfirewall.RuleGroupRuleGroupRuleVariablesIpSetIpSetArgs{ 209 // Definitions: pulumi.StringArray{ 210 // pulumi.String("1.2.3.4/32"), 211 // }, 212 // }, 213 // }, 214 // }, 215 // PortSets: networkfirewall.RuleGroupRuleGroupRuleVariablesPortSetArray{ 216 // &networkfirewall.RuleGroupRuleGroupRuleVariablesPortSetArgs{ 217 // Key: pulumi.String("HTTP_PORTS"), 218 // PortSet: &networkfirewall.RuleGroupRuleGroupRuleVariablesPortSetPortSetArgs{ 219 // Definitions: pulumi.StringArray{ 220 // pulumi.String("443"), 221 // pulumi.String("80"), 222 // }, 223 // }, 224 // }, 225 // }, 226 // }, 227 // RulesSource: &networkfirewall.RuleGroupRuleGroupRulesSourceArgs{ 228 // RulesString: invokeFile.Result, 229 // }, 230 // }, 231 // Tags: pulumi.StringMap{ 232 // "Tag1": pulumi.String("Value1"), 233 // "Tag2": pulumi.String("Value2"), 234 // }, 235 // }) 236 // if err != nil { 237 // return err 238 // } 239 // return nil 240 // }) 241 // } 242 // 243 // ``` 244 // <!--End PulumiCodeChooser --> 245 // 246 // ### Stateless Inspection with a Custom Action 247 // 248 // <!--Start PulumiCodeChooser --> 249 // ```go 250 // package main 251 // 252 // import ( 253 // 254 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall" 255 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 256 // 257 // ) 258 // 259 // func main() { 260 // pulumi.Run(func(ctx *pulumi.Context) error { 261 // _, err := networkfirewall.NewRuleGroup(ctx, "example", &networkfirewall.RuleGroupArgs{ 262 // Description: pulumi.String("Stateless Rate Limiting Rule"), 263 // Capacity: pulumi.Int(100), 264 // Name: pulumi.String("example"), 265 // Type: pulumi.String("STATELESS"), 266 // RuleGroup: &networkfirewall.RuleGroupRuleGroupArgs{ 267 // RulesSource: &networkfirewall.RuleGroupRuleGroupRulesSourceArgs{ 268 // StatelessRulesAndCustomActions: &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsArgs{ 269 // CustomActions: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsCustomActionArray{ 270 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsCustomActionArgs{ 271 // ActionDefinition: &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsCustomActionActionDefinitionArgs{ 272 // PublishMetricAction: &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsCustomActionActionDefinitionPublishMetricActionArgs{ 273 // Dimensions: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsCustomActionActionDefinitionPublishMetricActionDimensionArray{ 274 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsCustomActionActionDefinitionPublishMetricActionDimensionArgs{ 275 // Value: pulumi.String("2"), 276 // }, 277 // }, 278 // }, 279 // }, 280 // ActionName: pulumi.String("ExampleMetricsAction"), 281 // }, 282 // }, 283 // StatelessRules: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleArray{ 284 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleArgs{ 285 // Priority: pulumi.Int(1), 286 // RuleDefinition: &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionArgs{ 287 // Actions: pulumi.StringArray{ 288 // pulumi.String("aws:pass"), 289 // pulumi.String("ExampleMetricsAction"), 290 // }, 291 // MatchAttributes: &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesArgs{ 292 // Sources: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesSourceArray{ 293 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesSourceArgs{ 294 // AddressDefinition: pulumi.String("1.2.3.4/32"), 295 // }, 296 // }, 297 // SourcePorts: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesSourcePortArray{ 298 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesSourcePortArgs{ 299 // FromPort: pulumi.Int(443), 300 // ToPort: pulumi.Int(443), 301 // }, 302 // }, 303 // Destinations: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesDestinationArray{ 304 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesDestinationArgs{ 305 // AddressDefinition: pulumi.String("124.1.1.5/32"), 306 // }, 307 // }, 308 // DestinationPorts: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesDestinationPortArray{ 309 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesDestinationPortArgs{ 310 // FromPort: pulumi.Int(443), 311 // ToPort: pulumi.Int(443), 312 // }, 313 // }, 314 // Protocols: pulumi.IntArray{ 315 // pulumi.Int(6), 316 // }, 317 // TcpFlags: networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesTcpFlagArray{ 318 // &networkfirewall.RuleGroupRuleGroupRulesSourceStatelessRulesAndCustomActionsStatelessRuleRuleDefinitionMatchAttributesTcpFlagArgs{ 319 // Flags: pulumi.StringArray{ 320 // pulumi.String("SYN"), 321 // }, 322 // Masks: pulumi.StringArray{ 323 // pulumi.String("SYN"), 324 // pulumi.String("ACK"), 325 // }, 326 // }, 327 // }, 328 // }, 329 // }, 330 // }, 331 // }, 332 // }, 333 // }, 334 // }, 335 // Tags: pulumi.StringMap{ 336 // "Tag1": pulumi.String("Value1"), 337 // "Tag2": pulumi.String("Value2"), 338 // }, 339 // }) 340 // if err != nil { 341 // return err 342 // } 343 // return nil 344 // }) 345 // } 346 // 347 // ``` 348 // <!--End PulumiCodeChooser --> 349 // 350 // ### IP Set References to the Rule Group 351 // 352 // <!--Start PulumiCodeChooser --> 353 // ```go 354 // package main 355 // 356 // import ( 357 // 358 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall" 359 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 360 // 361 // ) 362 // 363 // func main() { 364 // pulumi.Run(func(ctx *pulumi.Context) error { 365 // _, err := networkfirewall.NewRuleGroup(ctx, "example", &networkfirewall.RuleGroupArgs{ 366 // Capacity: pulumi.Int(100), 367 // Name: pulumi.String("example"), 368 // Type: pulumi.String("STATEFUL"), 369 // RuleGroup: &networkfirewall.RuleGroupRuleGroupArgs{ 370 // RulesSource: &networkfirewall.RuleGroupRuleGroupRulesSourceArgs{ 371 // RulesSourceList: &networkfirewall.RuleGroupRuleGroupRulesSourceRulesSourceListArgs{ 372 // GeneratedRulesType: pulumi.String("DENYLIST"), 373 // TargetTypes: pulumi.StringArray{ 374 // pulumi.String("HTTP_HOST"), 375 // }, 376 // Targets: pulumi.StringArray{ 377 // pulumi.String("test.example.com"), 378 // }, 379 // }, 380 // }, 381 // ReferenceSets: &networkfirewall.RuleGroupRuleGroupReferenceSetsArgs{ 382 // IpSetReferences: networkfirewall.RuleGroupRuleGroupReferenceSetsIpSetReferenceArray{ 383 // &networkfirewall.RuleGroupRuleGroupReferenceSetsIpSetReferenceArgs{ 384 // Key: pulumi.String("example"), 385 // IpSetReferences: networkfirewall.RuleGroupRuleGroupReferenceSetsIpSetReferenceIpSetReferenceArray{ 386 // &networkfirewall.RuleGroupRuleGroupReferenceSetsIpSetReferenceIpSetReferenceArgs{ 387 // ReferenceArn: pulumi.Any(this.Arn), 388 // }, 389 // }, 390 // }, 391 // }, 392 // }, 393 // }, 394 // Tags: pulumi.StringMap{ 395 // "Tag1": pulumi.String("Value1"), 396 // "Tag2": pulumi.String("Value2"), 397 // }, 398 // }) 399 // if err != nil { 400 // return err 401 // } 402 // return nil 403 // }) 404 // } 405 // 406 // ``` 407 // <!--End PulumiCodeChooser --> 408 // 409 // ## Import 410 // 411 // Using `pulumi import`, import Network Firewall Rule Groups using their `arn`. For example: 412 // 413 // ```sh 414 // $ pulumi import aws:networkfirewall/ruleGroup:RuleGroup example arn:aws:network-firewall:us-west-1:123456789012:stateful-rulegroup/example 415 // ``` 416 type RuleGroup struct { 417 pulumi.CustomResourceState 418 419 // The Amazon Resource Name (ARN) that identifies the rule group. 420 Arn pulumi.StringOutput `pulumi:"arn"` 421 // The maximum number of operating resources that this rule group can use. For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules. For a stateful rule group, the minimum capacity required is the number of individual rules. 422 Capacity pulumi.IntOutput `pulumi:"capacity"` 423 // A friendly description of the rule group. 424 Description pulumi.StringPtrOutput `pulumi:"description"` 425 // KMS encryption configuration settings. See Encryption Configuration below for details. 426 EncryptionConfiguration RuleGroupEncryptionConfigurationPtrOutput `pulumi:"encryptionConfiguration"` 427 // A friendly name of the rule group. 428 Name pulumi.StringOutput `pulumi:"name"` 429 // A configuration block that defines the rule group rules. Required unless `rules` is specified. See Rule Group below for details. 430 RuleGroup RuleGroupRuleGroupOutput `pulumi:"ruleGroup"` 431 // The stateful rule group rules specifications in Suricata file format, with one rule per line. Use this to import your existing Suricata compatible rule groups. Required unless `ruleGroup` is specified. 432 Rules pulumi.StringPtrOutput `pulumi:"rules"` 433 // A map of key:value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 434 Tags pulumi.StringMapOutput `pulumi:"tags"` 435 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 436 // 437 // Deprecated: Please use `tags` instead. 438 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 439 // Whether the rule group is stateless (containing stateless rules) or stateful (containing stateful rules). Valid values include: `STATEFUL` or `STATELESS`. 440 Type pulumi.StringOutput `pulumi:"type"` 441 // A string token used when updating the rule group. 442 UpdateToken pulumi.StringOutput `pulumi:"updateToken"` 443 } 444 445 // NewRuleGroup registers a new resource with the given unique name, arguments, and options. 446 func NewRuleGroup(ctx *pulumi.Context, 447 name string, args *RuleGroupArgs, opts ...pulumi.ResourceOption) (*RuleGroup, error) { 448 if args == nil { 449 return nil, errors.New("missing one or more required arguments") 450 } 451 452 if args.Capacity == nil { 453 return nil, errors.New("invalid value for required argument 'Capacity'") 454 } 455 if args.Type == nil { 456 return nil, errors.New("invalid value for required argument 'Type'") 457 } 458 opts = internal.PkgResourceDefaultOpts(opts) 459 var resource RuleGroup 460 err := ctx.RegisterResource("aws:networkfirewall/ruleGroup:RuleGroup", name, args, &resource, opts...) 461 if err != nil { 462 return nil, err 463 } 464 return &resource, nil 465 } 466 467 // GetRuleGroup gets an existing RuleGroup resource's state with the given name, ID, and optional 468 // state properties that are used to uniquely qualify the lookup (nil if not required). 469 func GetRuleGroup(ctx *pulumi.Context, 470 name string, id pulumi.IDInput, state *RuleGroupState, opts ...pulumi.ResourceOption) (*RuleGroup, error) { 471 var resource RuleGroup 472 err := ctx.ReadResource("aws:networkfirewall/ruleGroup:RuleGroup", name, id, state, &resource, opts...) 473 if err != nil { 474 return nil, err 475 } 476 return &resource, nil 477 } 478 479 // Input properties used for looking up and filtering RuleGroup resources. 480 type ruleGroupState struct { 481 // The Amazon Resource Name (ARN) that identifies the rule group. 482 Arn *string `pulumi:"arn"` 483 // The maximum number of operating resources that this rule group can use. For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules. For a stateful rule group, the minimum capacity required is the number of individual rules. 484 Capacity *int `pulumi:"capacity"` 485 // A friendly description of the rule group. 486 Description *string `pulumi:"description"` 487 // KMS encryption configuration settings. See Encryption Configuration below for details. 488 EncryptionConfiguration *RuleGroupEncryptionConfiguration `pulumi:"encryptionConfiguration"` 489 // A friendly name of the rule group. 490 Name *string `pulumi:"name"` 491 // A configuration block that defines the rule group rules. Required unless `rules` is specified. See Rule Group below for details. 492 RuleGroup *RuleGroupRuleGroup `pulumi:"ruleGroup"` 493 // The stateful rule group rules specifications in Suricata file format, with one rule per line. Use this to import your existing Suricata compatible rule groups. Required unless `ruleGroup` is specified. 494 Rules *string `pulumi:"rules"` 495 // A map of key:value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 496 Tags map[string]string `pulumi:"tags"` 497 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 498 // 499 // Deprecated: Please use `tags` instead. 500 TagsAll map[string]string `pulumi:"tagsAll"` 501 // Whether the rule group is stateless (containing stateless rules) or stateful (containing stateful rules). Valid values include: `STATEFUL` or `STATELESS`. 502 Type *string `pulumi:"type"` 503 // A string token used when updating the rule group. 504 UpdateToken *string `pulumi:"updateToken"` 505 } 506 507 type RuleGroupState struct { 508 // The Amazon Resource Name (ARN) that identifies the rule group. 509 Arn pulumi.StringPtrInput 510 // The maximum number of operating resources that this rule group can use. For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules. For a stateful rule group, the minimum capacity required is the number of individual rules. 511 Capacity pulumi.IntPtrInput 512 // A friendly description of the rule group. 513 Description pulumi.StringPtrInput 514 // KMS encryption configuration settings. See Encryption Configuration below for details. 515 EncryptionConfiguration RuleGroupEncryptionConfigurationPtrInput 516 // A friendly name of the rule group. 517 Name pulumi.StringPtrInput 518 // A configuration block that defines the rule group rules. Required unless `rules` is specified. See Rule Group below for details. 519 RuleGroup RuleGroupRuleGroupPtrInput 520 // The stateful rule group rules specifications in Suricata file format, with one rule per line. Use this to import your existing Suricata compatible rule groups. Required unless `ruleGroup` is specified. 521 Rules pulumi.StringPtrInput 522 // A map of key:value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 523 Tags pulumi.StringMapInput 524 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 525 // 526 // Deprecated: Please use `tags` instead. 527 TagsAll pulumi.StringMapInput 528 // Whether the rule group is stateless (containing stateless rules) or stateful (containing stateful rules). Valid values include: `STATEFUL` or `STATELESS`. 529 Type pulumi.StringPtrInput 530 // A string token used when updating the rule group. 531 UpdateToken pulumi.StringPtrInput 532 } 533 534 func (RuleGroupState) ElementType() reflect.Type { 535 return reflect.TypeOf((*ruleGroupState)(nil)).Elem() 536 } 537 538 type ruleGroupArgs struct { 539 // The maximum number of operating resources that this rule group can use. For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules. For a stateful rule group, the minimum capacity required is the number of individual rules. 540 Capacity int `pulumi:"capacity"` 541 // A friendly description of the rule group. 542 Description *string `pulumi:"description"` 543 // KMS encryption configuration settings. See Encryption Configuration below for details. 544 EncryptionConfiguration *RuleGroupEncryptionConfiguration `pulumi:"encryptionConfiguration"` 545 // A friendly name of the rule group. 546 Name *string `pulumi:"name"` 547 // A configuration block that defines the rule group rules. Required unless `rules` is specified. See Rule Group below for details. 548 RuleGroup *RuleGroupRuleGroup `pulumi:"ruleGroup"` 549 // The stateful rule group rules specifications in Suricata file format, with one rule per line. Use this to import your existing Suricata compatible rule groups. Required unless `ruleGroup` is specified. 550 Rules *string `pulumi:"rules"` 551 // A map of key:value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 552 Tags map[string]string `pulumi:"tags"` 553 // Whether the rule group is stateless (containing stateless rules) or stateful (containing stateful rules). Valid values include: `STATEFUL` or `STATELESS`. 554 Type string `pulumi:"type"` 555 } 556 557 // The set of arguments for constructing a RuleGroup resource. 558 type RuleGroupArgs struct { 559 // The maximum number of operating resources that this rule group can use. For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules. For a stateful rule group, the minimum capacity required is the number of individual rules. 560 Capacity pulumi.IntInput 561 // A friendly description of the rule group. 562 Description pulumi.StringPtrInput 563 // KMS encryption configuration settings. See Encryption Configuration below for details. 564 EncryptionConfiguration RuleGroupEncryptionConfigurationPtrInput 565 // A friendly name of the rule group. 566 Name pulumi.StringPtrInput 567 // A configuration block that defines the rule group rules. Required unless `rules` is specified. See Rule Group below for details. 568 RuleGroup RuleGroupRuleGroupPtrInput 569 // The stateful rule group rules specifications in Suricata file format, with one rule per line. Use this to import your existing Suricata compatible rule groups. Required unless `ruleGroup` is specified. 570 Rules pulumi.StringPtrInput 571 // A map of key:value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 572 Tags pulumi.StringMapInput 573 // Whether the rule group is stateless (containing stateless rules) or stateful (containing stateful rules). Valid values include: `STATEFUL` or `STATELESS`. 574 Type pulumi.StringInput 575 } 576 577 func (RuleGroupArgs) ElementType() reflect.Type { 578 return reflect.TypeOf((*ruleGroupArgs)(nil)).Elem() 579 } 580 581 type RuleGroupInput interface { 582 pulumi.Input 583 584 ToRuleGroupOutput() RuleGroupOutput 585 ToRuleGroupOutputWithContext(ctx context.Context) RuleGroupOutput 586 } 587 588 func (*RuleGroup) ElementType() reflect.Type { 589 return reflect.TypeOf((**RuleGroup)(nil)).Elem() 590 } 591 592 func (i *RuleGroup) ToRuleGroupOutput() RuleGroupOutput { 593 return i.ToRuleGroupOutputWithContext(context.Background()) 594 } 595 596 func (i *RuleGroup) ToRuleGroupOutputWithContext(ctx context.Context) RuleGroupOutput { 597 return pulumi.ToOutputWithContext(ctx, i).(RuleGroupOutput) 598 } 599 600 // RuleGroupArrayInput is an input type that accepts RuleGroupArray and RuleGroupArrayOutput values. 601 // You can construct a concrete instance of `RuleGroupArrayInput` via: 602 // 603 // RuleGroupArray{ RuleGroupArgs{...} } 604 type RuleGroupArrayInput interface { 605 pulumi.Input 606 607 ToRuleGroupArrayOutput() RuleGroupArrayOutput 608 ToRuleGroupArrayOutputWithContext(context.Context) RuleGroupArrayOutput 609 } 610 611 type RuleGroupArray []RuleGroupInput 612 613 func (RuleGroupArray) ElementType() reflect.Type { 614 return reflect.TypeOf((*[]*RuleGroup)(nil)).Elem() 615 } 616 617 func (i RuleGroupArray) ToRuleGroupArrayOutput() RuleGroupArrayOutput { 618 return i.ToRuleGroupArrayOutputWithContext(context.Background()) 619 } 620 621 func (i RuleGroupArray) ToRuleGroupArrayOutputWithContext(ctx context.Context) RuleGroupArrayOutput { 622 return pulumi.ToOutputWithContext(ctx, i).(RuleGroupArrayOutput) 623 } 624 625 // RuleGroupMapInput is an input type that accepts RuleGroupMap and RuleGroupMapOutput values. 626 // You can construct a concrete instance of `RuleGroupMapInput` via: 627 // 628 // RuleGroupMap{ "key": RuleGroupArgs{...} } 629 type RuleGroupMapInput interface { 630 pulumi.Input 631 632 ToRuleGroupMapOutput() RuleGroupMapOutput 633 ToRuleGroupMapOutputWithContext(context.Context) RuleGroupMapOutput 634 } 635 636 type RuleGroupMap map[string]RuleGroupInput 637 638 func (RuleGroupMap) ElementType() reflect.Type { 639 return reflect.TypeOf((*map[string]*RuleGroup)(nil)).Elem() 640 } 641 642 func (i RuleGroupMap) ToRuleGroupMapOutput() RuleGroupMapOutput { 643 return i.ToRuleGroupMapOutputWithContext(context.Background()) 644 } 645 646 func (i RuleGroupMap) ToRuleGroupMapOutputWithContext(ctx context.Context) RuleGroupMapOutput { 647 return pulumi.ToOutputWithContext(ctx, i).(RuleGroupMapOutput) 648 } 649 650 type RuleGroupOutput struct{ *pulumi.OutputState } 651 652 func (RuleGroupOutput) ElementType() reflect.Type { 653 return reflect.TypeOf((**RuleGroup)(nil)).Elem() 654 } 655 656 func (o RuleGroupOutput) ToRuleGroupOutput() RuleGroupOutput { 657 return o 658 } 659 660 func (o RuleGroupOutput) ToRuleGroupOutputWithContext(ctx context.Context) RuleGroupOutput { 661 return o 662 } 663 664 // The Amazon Resource Name (ARN) that identifies the rule group. 665 func (o RuleGroupOutput) Arn() pulumi.StringOutput { 666 return o.ApplyT(func(v *RuleGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 667 } 668 669 // The maximum number of operating resources that this rule group can use. For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules. For a stateful rule group, the minimum capacity required is the number of individual rules. 670 func (o RuleGroupOutput) Capacity() pulumi.IntOutput { 671 return o.ApplyT(func(v *RuleGroup) pulumi.IntOutput { return v.Capacity }).(pulumi.IntOutput) 672 } 673 674 // A friendly description of the rule group. 675 func (o RuleGroupOutput) Description() pulumi.StringPtrOutput { 676 return o.ApplyT(func(v *RuleGroup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 677 } 678 679 // KMS encryption configuration settings. See Encryption Configuration below for details. 680 func (o RuleGroupOutput) EncryptionConfiguration() RuleGroupEncryptionConfigurationPtrOutput { 681 return o.ApplyT(func(v *RuleGroup) RuleGroupEncryptionConfigurationPtrOutput { return v.EncryptionConfiguration }).(RuleGroupEncryptionConfigurationPtrOutput) 682 } 683 684 // A friendly name of the rule group. 685 func (o RuleGroupOutput) Name() pulumi.StringOutput { 686 return o.ApplyT(func(v *RuleGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 687 } 688 689 // A configuration block that defines the rule group rules. Required unless `rules` is specified. See Rule Group below for details. 690 func (o RuleGroupOutput) RuleGroup() RuleGroupRuleGroupOutput { 691 return o.ApplyT(func(v *RuleGroup) RuleGroupRuleGroupOutput { return v.RuleGroup }).(RuleGroupRuleGroupOutput) 692 } 693 694 // The stateful rule group rules specifications in Suricata file format, with one rule per line. Use this to import your existing Suricata compatible rule groups. Required unless `ruleGroup` is specified. 695 func (o RuleGroupOutput) Rules() pulumi.StringPtrOutput { 696 return o.ApplyT(func(v *RuleGroup) pulumi.StringPtrOutput { return v.Rules }).(pulumi.StringPtrOutput) 697 } 698 699 // A map of key:value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 700 func (o RuleGroupOutput) Tags() pulumi.StringMapOutput { 701 return o.ApplyT(func(v *RuleGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 702 } 703 704 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 705 // 706 // Deprecated: Please use `tags` instead. 707 func (o RuleGroupOutput) TagsAll() pulumi.StringMapOutput { 708 return o.ApplyT(func(v *RuleGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 709 } 710 711 // Whether the rule group is stateless (containing stateless rules) or stateful (containing stateful rules). Valid values include: `STATEFUL` or `STATELESS`. 712 func (o RuleGroupOutput) Type() pulumi.StringOutput { 713 return o.ApplyT(func(v *RuleGroup) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 714 } 715 716 // A string token used when updating the rule group. 717 func (o RuleGroupOutput) UpdateToken() pulumi.StringOutput { 718 return o.ApplyT(func(v *RuleGroup) pulumi.StringOutput { return v.UpdateToken }).(pulumi.StringOutput) 719 } 720 721 type RuleGroupArrayOutput struct{ *pulumi.OutputState } 722 723 func (RuleGroupArrayOutput) ElementType() reflect.Type { 724 return reflect.TypeOf((*[]*RuleGroup)(nil)).Elem() 725 } 726 727 func (o RuleGroupArrayOutput) ToRuleGroupArrayOutput() RuleGroupArrayOutput { 728 return o 729 } 730 731 func (o RuleGroupArrayOutput) ToRuleGroupArrayOutputWithContext(ctx context.Context) RuleGroupArrayOutput { 732 return o 733 } 734 735 func (o RuleGroupArrayOutput) Index(i pulumi.IntInput) RuleGroupOutput { 736 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RuleGroup { 737 return vs[0].([]*RuleGroup)[vs[1].(int)] 738 }).(RuleGroupOutput) 739 } 740 741 type RuleGroupMapOutput struct{ *pulumi.OutputState } 742 743 func (RuleGroupMapOutput) ElementType() reflect.Type { 744 return reflect.TypeOf((*map[string]*RuleGroup)(nil)).Elem() 745 } 746 747 func (o RuleGroupMapOutput) ToRuleGroupMapOutput() RuleGroupMapOutput { 748 return o 749 } 750 751 func (o RuleGroupMapOutput) ToRuleGroupMapOutputWithContext(ctx context.Context) RuleGroupMapOutput { 752 return o 753 } 754 755 func (o RuleGroupMapOutput) MapIndex(k pulumi.StringInput) RuleGroupOutput { 756 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RuleGroup { 757 return vs[0].(map[string]*RuleGroup)[vs[1].(string)] 758 }).(RuleGroupOutput) 759 } 760 761 func init() { 762 pulumi.RegisterInputType(reflect.TypeOf((*RuleGroupInput)(nil)).Elem(), &RuleGroup{}) 763 pulumi.RegisterInputType(reflect.TypeOf((*RuleGroupArrayInput)(nil)).Elem(), RuleGroupArray{}) 764 pulumi.RegisterInputType(reflect.TypeOf((*RuleGroupMapInput)(nil)).Elem(), RuleGroupMap{}) 765 pulumi.RegisterOutputType(RuleGroupOutput{}) 766 pulumi.RegisterOutputType(RuleGroupArrayOutput{}) 767 pulumi.RegisterOutputType(RuleGroupMapOutput{}) 768 }