github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cfg/rule.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  // Provides an AWS Config Rule.
    16  //
    17  // > **Note:** Config Rule requires an existing Configuration Recorder to be present. Use of `dependsOn` is recommended (as shown below) to avoid race conditions.
    18  //
    19  // ## Example Usage
    20  //
    21  // ### AWS Managed Rules
    22  //
    23  // AWS managed rules can be used by setting the source owner to `AWS` and the source identifier to the name of the managed rule. More information about AWS managed rules can be found in the [AWS Config Developer Guide](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html).
    24  //
    25  // <!--Start PulumiCodeChooser -->
    26  // ```go
    27  // package main
    28  //
    29  // import (
    30  //
    31  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cfg"
    32  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    33  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    34  //
    35  // )
    36  //
    37  //	func main() {
    38  //		pulumi.Run(func(ctx *pulumi.Context) error {
    39  //			assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    40  //				Statements: []iam.GetPolicyDocumentStatement{
    41  //					{
    42  //						Effect: pulumi.StringRef("Allow"),
    43  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
    44  //							{
    45  //								Type: "Service",
    46  //								Identifiers: []string{
    47  //									"config.amazonaws.com",
    48  //								},
    49  //							},
    50  //						},
    51  //						Actions: []string{
    52  //							"sts:AssumeRole",
    53  //						},
    54  //					},
    55  //				},
    56  //			}, nil)
    57  //			if err != nil {
    58  //				return err
    59  //			}
    60  //			rRole, err := iam.NewRole(ctx, "r", &iam.RoleArgs{
    61  //				Name:             pulumi.String("my-awsconfig-role"),
    62  //				AssumeRolePolicy: pulumi.String(assumeRole.Json),
    63  //			})
    64  //			if err != nil {
    65  //				return err
    66  //			}
    67  //			foo, err := cfg.NewRecorder(ctx, "foo", &cfg.RecorderArgs{
    68  //				Name:    pulumi.String("example"),
    69  //				RoleArn: rRole.Arn,
    70  //			})
    71  //			if err != nil {
    72  //				return err
    73  //			}
    74  //			_, err = cfg.NewRule(ctx, "r", &cfg.RuleArgs{
    75  //				Name: pulumi.String("example"),
    76  //				Source: &cfg.RuleSourceArgs{
    77  //					Owner:            pulumi.String("AWS"),
    78  //					SourceIdentifier: pulumi.String("S3_BUCKET_VERSIONING_ENABLED"),
    79  //				},
    80  //			}, pulumi.DependsOn([]pulumi.Resource{
    81  //				foo,
    82  //			}))
    83  //			if err != nil {
    84  //				return err
    85  //			}
    86  //			p, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    87  //				Statements: []iam.GetPolicyDocumentStatement{
    88  //					{
    89  //						Effect: pulumi.StringRef("Allow"),
    90  //						Actions: []string{
    91  //							"config:Put*",
    92  //						},
    93  //						Resources: []string{
    94  //							"*",
    95  //						},
    96  //					},
    97  //				},
    98  //			}, nil)
    99  //			if err != nil {
   100  //				return err
   101  //			}
   102  //			_, err = iam.NewRolePolicy(ctx, "p", &iam.RolePolicyArgs{
   103  //				Name:   pulumi.String("my-awsconfig-policy"),
   104  //				Role:   rRole.ID(),
   105  //				Policy: pulumi.String(p.Json),
   106  //			})
   107  //			if err != nil {
   108  //				return err
   109  //			}
   110  //			return nil
   111  //		})
   112  //	}
   113  //
   114  // ```
   115  // <!--End PulumiCodeChooser -->
   116  //
   117  // ### Custom Rules
   118  //
   119  // Custom rules can be used by setting the source owner to `CUSTOM_LAMBDA` and the source identifier to the Amazon Resource Name (ARN) of the Lambda Function. The AWS Config service must have permissions to invoke the Lambda Function, e.g., via the `lambda.Permission` resource. More information about custom rules can be found in the [AWS Config Developer Guide](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules.html).
   120  //
   121  // <!--Start PulumiCodeChooser -->
   122  // ```go
   123  // package main
   124  //
   125  // import (
   126  //
   127  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cfg"
   128  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
   129  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   130  //
   131  // )
   132  //
   133  //	func main() {
   134  //		pulumi.Run(func(ctx *pulumi.Context) error {
   135  //			example, err := cfg.NewRecorder(ctx, "example", nil)
   136  //			if err != nil {
   137  //				return err
   138  //			}
   139  //			exampleFunction, err := lambda.NewFunction(ctx, "example", nil)
   140  //			if err != nil {
   141  //				return err
   142  //			}
   143  //			examplePermission, err := lambda.NewPermission(ctx, "example", &lambda.PermissionArgs{
   144  //				Action:      pulumi.String("lambda:InvokeFunction"),
   145  //				Function:    exampleFunction.Arn,
   146  //				Principal:   pulumi.String("config.amazonaws.com"),
   147  //				StatementId: pulumi.String("AllowExecutionFromConfig"),
   148  //			})
   149  //			if err != nil {
   150  //				return err
   151  //			}
   152  //			_, err = cfg.NewRule(ctx, "example", &cfg.RuleArgs{
   153  //				Source: &cfg.RuleSourceArgs{
   154  //					Owner:            pulumi.String("CUSTOM_LAMBDA"),
   155  //					SourceIdentifier: exampleFunction.Arn,
   156  //				},
   157  //			}, pulumi.DependsOn([]pulumi.Resource{
   158  //				example,
   159  //				examplePermission,
   160  //			}))
   161  //			if err != nil {
   162  //				return err
   163  //			}
   164  //			return nil
   165  //		})
   166  //	}
   167  //
   168  // ```
   169  // <!--End PulumiCodeChooser -->
   170  //
   171  // ### Custom Policies
   172  //
   173  // <!--Start PulumiCodeChooser -->
   174  // ```go
   175  // package main
   176  //
   177  // import (
   178  //
   179  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cfg"
   180  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   181  //
   182  // )
   183  //
   184  //	func main() {
   185  //		pulumi.Run(func(ctx *pulumi.Context) error {
   186  //			_, err := cfg.NewRule(ctx, "example", &cfg.RuleArgs{
   187  //				Name: pulumi.String("example"),
   188  //				Source: &cfg.RuleSourceArgs{
   189  //					Owner: pulumi.String("CUSTOM_POLICY"),
   190  //					SourceDetails: cfg.RuleSourceSourceDetailArray{
   191  //						&cfg.RuleSourceSourceDetailArgs{
   192  //							MessageType: pulumi.String("ConfigurationItemChangeNotification"),
   193  //						},
   194  //					},
   195  //					CustomPolicyDetails: &cfg.RuleSourceCustomPolicyDetailsArgs{
   196  //						PolicyRuntime: pulumi.String("guard-2.x.x"),
   197  //						PolicyText: pulumi.String(`	  rule tableisactive when
   198  //			  resourceType == "AWS::DynamoDB::Table" {
   199  //			  configuration.tableStatus == ['ACTIVE']
   200  //		  }
   201  //
   202  //		  rule checkcompliance when
   203  //			  resourceType == "AWS::DynamoDB::Table"
   204  //			  tableisactive {
   205  //				  supplementaryConfiguration.ContinuousBackupsDescription.pointInTimeRecoveryDescription.pointInTimeRecoveryStatus == "ENABLED"
   206  //		  }
   207  //
   208  // `),
   209  //
   210  //					},
   211  //				},
   212  //			})
   213  //			if err != nil {
   214  //				return err
   215  //			}
   216  //			return nil
   217  //		})
   218  //	}
   219  //
   220  // ```
   221  // <!--End PulumiCodeChooser -->
   222  //
   223  // ## Import
   224  //
   225  // Using `pulumi import`, import Config Rule using the name. For example:
   226  //
   227  // ```sh
   228  // $ pulumi import aws:cfg/rule:Rule foo example
   229  // ```
   230  type Rule struct {
   231  	pulumi.CustomResourceState
   232  
   233  	// The ARN of the config rule
   234  	Arn pulumi.StringOutput `pulumi:"arn"`
   235  	// Description of the rule
   236  	Description pulumi.StringPtrOutput `pulumi:"description"`
   237  	// The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
   238  	EvaluationModes RuleEvaluationModeArrayOutput `pulumi:"evaluationModes"`
   239  	// A string in JSON format that is passed to the AWS Config rule Lambda function.
   240  	InputParameters pulumi.StringPtrOutput `pulumi:"inputParameters"`
   241  	// The maximum frequency with which AWS Config runs evaluations for a rule.
   242  	MaximumExecutionFrequency pulumi.StringPtrOutput `pulumi:"maximumExecutionFrequency"`
   243  	// The name of the rule
   244  	Name pulumi.StringOutput `pulumi:"name"`
   245  	// The ID of the config rule
   246  	RuleId pulumi.StringOutput `pulumi:"ruleId"`
   247  	// Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
   248  	Scope RuleScopePtrOutput `pulumi:"scope"`
   249  	// Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
   250  	Source RuleSourceOutput `pulumi:"source"`
   251  	// 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.
   252  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   253  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   254  	//
   255  	// Deprecated: Please use `tags` instead.
   256  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   257  }
   258  
   259  // NewRule registers a new resource with the given unique name, arguments, and options.
   260  func NewRule(ctx *pulumi.Context,
   261  	name string, args *RuleArgs, opts ...pulumi.ResourceOption) (*Rule, error) {
   262  	if args == nil {
   263  		return nil, errors.New("missing one or more required arguments")
   264  	}
   265  
   266  	if args.Source == nil {
   267  		return nil, errors.New("invalid value for required argument 'Source'")
   268  	}
   269  	opts = internal.PkgResourceDefaultOpts(opts)
   270  	var resource Rule
   271  	err := ctx.RegisterResource("aws:cfg/rule:Rule", name, args, &resource, opts...)
   272  	if err != nil {
   273  		return nil, err
   274  	}
   275  	return &resource, nil
   276  }
   277  
   278  // GetRule gets an existing Rule resource's state with the given name, ID, and optional
   279  // state properties that are used to uniquely qualify the lookup (nil if not required).
   280  func GetRule(ctx *pulumi.Context,
   281  	name string, id pulumi.IDInput, state *RuleState, opts ...pulumi.ResourceOption) (*Rule, error) {
   282  	var resource Rule
   283  	err := ctx.ReadResource("aws:cfg/rule:Rule", name, id, state, &resource, opts...)
   284  	if err != nil {
   285  		return nil, err
   286  	}
   287  	return &resource, nil
   288  }
   289  
   290  // Input properties used for looking up and filtering Rule resources.
   291  type ruleState struct {
   292  	// The ARN of the config rule
   293  	Arn *string `pulumi:"arn"`
   294  	// Description of the rule
   295  	Description *string `pulumi:"description"`
   296  	// The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
   297  	EvaluationModes []RuleEvaluationMode `pulumi:"evaluationModes"`
   298  	// A string in JSON format that is passed to the AWS Config rule Lambda function.
   299  	InputParameters *string `pulumi:"inputParameters"`
   300  	// The maximum frequency with which AWS Config runs evaluations for a rule.
   301  	MaximumExecutionFrequency *string `pulumi:"maximumExecutionFrequency"`
   302  	// The name of the rule
   303  	Name *string `pulumi:"name"`
   304  	// The ID of the config rule
   305  	RuleId *string `pulumi:"ruleId"`
   306  	// Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
   307  	Scope *RuleScope `pulumi:"scope"`
   308  	// Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
   309  	Source *RuleSource `pulumi:"source"`
   310  	// 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.
   311  	Tags map[string]string `pulumi:"tags"`
   312  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   313  	//
   314  	// Deprecated: Please use `tags` instead.
   315  	TagsAll map[string]string `pulumi:"tagsAll"`
   316  }
   317  
   318  type RuleState struct {
   319  	// The ARN of the config rule
   320  	Arn pulumi.StringPtrInput
   321  	// Description of the rule
   322  	Description pulumi.StringPtrInput
   323  	// The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
   324  	EvaluationModes RuleEvaluationModeArrayInput
   325  	// A string in JSON format that is passed to the AWS Config rule Lambda function.
   326  	InputParameters pulumi.StringPtrInput
   327  	// The maximum frequency with which AWS Config runs evaluations for a rule.
   328  	MaximumExecutionFrequency pulumi.StringPtrInput
   329  	// The name of the rule
   330  	Name pulumi.StringPtrInput
   331  	// The ID of the config rule
   332  	RuleId pulumi.StringPtrInput
   333  	// Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
   334  	Scope RuleScopePtrInput
   335  	// Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
   336  	Source RuleSourcePtrInput
   337  	// 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.
   338  	Tags pulumi.StringMapInput
   339  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   340  	//
   341  	// Deprecated: Please use `tags` instead.
   342  	TagsAll pulumi.StringMapInput
   343  }
   344  
   345  func (RuleState) ElementType() reflect.Type {
   346  	return reflect.TypeOf((*ruleState)(nil)).Elem()
   347  }
   348  
   349  type ruleArgs struct {
   350  	// Description of the rule
   351  	Description *string `pulumi:"description"`
   352  	// The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
   353  	EvaluationModes []RuleEvaluationMode `pulumi:"evaluationModes"`
   354  	// A string in JSON format that is passed to the AWS Config rule Lambda function.
   355  	InputParameters *string `pulumi:"inputParameters"`
   356  	// The maximum frequency with which AWS Config runs evaluations for a rule.
   357  	MaximumExecutionFrequency *string `pulumi:"maximumExecutionFrequency"`
   358  	// The name of the rule
   359  	Name *string `pulumi:"name"`
   360  	// Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
   361  	Scope *RuleScope `pulumi:"scope"`
   362  	// Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
   363  	Source RuleSource `pulumi:"source"`
   364  	// 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.
   365  	Tags map[string]string `pulumi:"tags"`
   366  }
   367  
   368  // The set of arguments for constructing a Rule resource.
   369  type RuleArgs struct {
   370  	// Description of the rule
   371  	Description pulumi.StringPtrInput
   372  	// The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
   373  	EvaluationModes RuleEvaluationModeArrayInput
   374  	// A string in JSON format that is passed to the AWS Config rule Lambda function.
   375  	InputParameters pulumi.StringPtrInput
   376  	// The maximum frequency with which AWS Config runs evaluations for a rule.
   377  	MaximumExecutionFrequency pulumi.StringPtrInput
   378  	// The name of the rule
   379  	Name pulumi.StringPtrInput
   380  	// Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
   381  	Scope RuleScopePtrInput
   382  	// Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
   383  	Source RuleSourceInput
   384  	// 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.
   385  	Tags pulumi.StringMapInput
   386  }
   387  
   388  func (RuleArgs) ElementType() reflect.Type {
   389  	return reflect.TypeOf((*ruleArgs)(nil)).Elem()
   390  }
   391  
   392  type RuleInput interface {
   393  	pulumi.Input
   394  
   395  	ToRuleOutput() RuleOutput
   396  	ToRuleOutputWithContext(ctx context.Context) RuleOutput
   397  }
   398  
   399  func (*Rule) ElementType() reflect.Type {
   400  	return reflect.TypeOf((**Rule)(nil)).Elem()
   401  }
   402  
   403  func (i *Rule) ToRuleOutput() RuleOutput {
   404  	return i.ToRuleOutputWithContext(context.Background())
   405  }
   406  
   407  func (i *Rule) ToRuleOutputWithContext(ctx context.Context) RuleOutput {
   408  	return pulumi.ToOutputWithContext(ctx, i).(RuleOutput)
   409  }
   410  
   411  // RuleArrayInput is an input type that accepts RuleArray and RuleArrayOutput values.
   412  // You can construct a concrete instance of `RuleArrayInput` via:
   413  //
   414  //	RuleArray{ RuleArgs{...} }
   415  type RuleArrayInput interface {
   416  	pulumi.Input
   417  
   418  	ToRuleArrayOutput() RuleArrayOutput
   419  	ToRuleArrayOutputWithContext(context.Context) RuleArrayOutput
   420  }
   421  
   422  type RuleArray []RuleInput
   423  
   424  func (RuleArray) ElementType() reflect.Type {
   425  	return reflect.TypeOf((*[]*Rule)(nil)).Elem()
   426  }
   427  
   428  func (i RuleArray) ToRuleArrayOutput() RuleArrayOutput {
   429  	return i.ToRuleArrayOutputWithContext(context.Background())
   430  }
   431  
   432  func (i RuleArray) ToRuleArrayOutputWithContext(ctx context.Context) RuleArrayOutput {
   433  	return pulumi.ToOutputWithContext(ctx, i).(RuleArrayOutput)
   434  }
   435  
   436  // RuleMapInput is an input type that accepts RuleMap and RuleMapOutput values.
   437  // You can construct a concrete instance of `RuleMapInput` via:
   438  //
   439  //	RuleMap{ "key": RuleArgs{...} }
   440  type RuleMapInput interface {
   441  	pulumi.Input
   442  
   443  	ToRuleMapOutput() RuleMapOutput
   444  	ToRuleMapOutputWithContext(context.Context) RuleMapOutput
   445  }
   446  
   447  type RuleMap map[string]RuleInput
   448  
   449  func (RuleMap) ElementType() reflect.Type {
   450  	return reflect.TypeOf((*map[string]*Rule)(nil)).Elem()
   451  }
   452  
   453  func (i RuleMap) ToRuleMapOutput() RuleMapOutput {
   454  	return i.ToRuleMapOutputWithContext(context.Background())
   455  }
   456  
   457  func (i RuleMap) ToRuleMapOutputWithContext(ctx context.Context) RuleMapOutput {
   458  	return pulumi.ToOutputWithContext(ctx, i).(RuleMapOutput)
   459  }
   460  
   461  type RuleOutput struct{ *pulumi.OutputState }
   462  
   463  func (RuleOutput) ElementType() reflect.Type {
   464  	return reflect.TypeOf((**Rule)(nil)).Elem()
   465  }
   466  
   467  func (o RuleOutput) ToRuleOutput() RuleOutput {
   468  	return o
   469  }
   470  
   471  func (o RuleOutput) ToRuleOutputWithContext(ctx context.Context) RuleOutput {
   472  	return o
   473  }
   474  
   475  // The ARN of the config rule
   476  func (o RuleOutput) Arn() pulumi.StringOutput {
   477  	return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   478  }
   479  
   480  // Description of the rule
   481  func (o RuleOutput) Description() pulumi.StringPtrOutput {
   482  	return o.ApplyT(func(v *Rule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   483  }
   484  
   485  // The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
   486  func (o RuleOutput) EvaluationModes() RuleEvaluationModeArrayOutput {
   487  	return o.ApplyT(func(v *Rule) RuleEvaluationModeArrayOutput { return v.EvaluationModes }).(RuleEvaluationModeArrayOutput)
   488  }
   489  
   490  // A string in JSON format that is passed to the AWS Config rule Lambda function.
   491  func (o RuleOutput) InputParameters() pulumi.StringPtrOutput {
   492  	return o.ApplyT(func(v *Rule) pulumi.StringPtrOutput { return v.InputParameters }).(pulumi.StringPtrOutput)
   493  }
   494  
   495  // The maximum frequency with which AWS Config runs evaluations for a rule.
   496  func (o RuleOutput) MaximumExecutionFrequency() pulumi.StringPtrOutput {
   497  	return o.ApplyT(func(v *Rule) pulumi.StringPtrOutput { return v.MaximumExecutionFrequency }).(pulumi.StringPtrOutput)
   498  }
   499  
   500  // The name of the rule
   501  func (o RuleOutput) Name() pulumi.StringOutput {
   502  	return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   503  }
   504  
   505  // The ID of the config rule
   506  func (o RuleOutput) RuleId() pulumi.StringOutput {
   507  	return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.RuleId }).(pulumi.StringOutput)
   508  }
   509  
   510  // Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
   511  func (o RuleOutput) Scope() RuleScopePtrOutput {
   512  	return o.ApplyT(func(v *Rule) RuleScopePtrOutput { return v.Scope }).(RuleScopePtrOutput)
   513  }
   514  
   515  // Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
   516  func (o RuleOutput) Source() RuleSourceOutput {
   517  	return o.ApplyT(func(v *Rule) RuleSourceOutput { return v.Source }).(RuleSourceOutput)
   518  }
   519  
   520  // 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.
   521  func (o RuleOutput) Tags() pulumi.StringMapOutput {
   522  	return o.ApplyT(func(v *Rule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   523  }
   524  
   525  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   526  //
   527  // Deprecated: Please use `tags` instead.
   528  func (o RuleOutput) TagsAll() pulumi.StringMapOutput {
   529  	return o.ApplyT(func(v *Rule) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   530  }
   531  
   532  type RuleArrayOutput struct{ *pulumi.OutputState }
   533  
   534  func (RuleArrayOutput) ElementType() reflect.Type {
   535  	return reflect.TypeOf((*[]*Rule)(nil)).Elem()
   536  }
   537  
   538  func (o RuleArrayOutput) ToRuleArrayOutput() RuleArrayOutput {
   539  	return o
   540  }
   541  
   542  func (o RuleArrayOutput) ToRuleArrayOutputWithContext(ctx context.Context) RuleArrayOutput {
   543  	return o
   544  }
   545  
   546  func (o RuleArrayOutput) Index(i pulumi.IntInput) RuleOutput {
   547  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Rule {
   548  		return vs[0].([]*Rule)[vs[1].(int)]
   549  	}).(RuleOutput)
   550  }
   551  
   552  type RuleMapOutput struct{ *pulumi.OutputState }
   553  
   554  func (RuleMapOutput) ElementType() reflect.Type {
   555  	return reflect.TypeOf((*map[string]*Rule)(nil)).Elem()
   556  }
   557  
   558  func (o RuleMapOutput) ToRuleMapOutput() RuleMapOutput {
   559  	return o
   560  }
   561  
   562  func (o RuleMapOutput) ToRuleMapOutputWithContext(ctx context.Context) RuleMapOutput {
   563  	return o
   564  }
   565  
   566  func (o RuleMapOutput) MapIndex(k pulumi.StringInput) RuleOutput {
   567  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Rule {
   568  		return vs[0].(map[string]*Rule)[vs[1].(string)]
   569  	}).(RuleOutput)
   570  }
   571  
   572  func init() {
   573  	pulumi.RegisterInputType(reflect.TypeOf((*RuleInput)(nil)).Elem(), &Rule{})
   574  	pulumi.RegisterInputType(reflect.TypeOf((*RuleArrayInput)(nil)).Elem(), RuleArray{})
   575  	pulumi.RegisterInputType(reflect.TypeOf((*RuleMapInput)(nil)).Elem(), RuleMap{})
   576  	pulumi.RegisterOutputType(RuleOutput{})
   577  	pulumi.RegisterOutputType(RuleArrayOutput{})
   578  	pulumi.RegisterOutputType(RuleMapOutput{})
   579  }